I am trying to understand how a HASH ( or encrypted version of a code ) is produced in some software .

From now , i have identified the function responsible of generating a 128 bit value .

My goal is to be able to create a software able to generate the same 128 bit value from an input string composed of 6 to 9 numbers

I wonder if one of you might be able to , just by looking at the code , tells me if it is a "well known" hashing / crypting algorithm

Any advice on how to be able to reuse the asm code into an autonomous program would also be appreciated ( i guess it is a bit like creating a sort of keygen ... )

Thanks

Here is the function call

; Function Call :

0916532C | push ecx | ;&key = et_ _ _ _ts (65745f5f5f5f7473) <=== Always the same (supposed to be a constant key)

0916532D | push ebp | ;&Buffer_Result <=== the 128 bit resulting value is stored here

0916532E | push esi | ;&str_user_code (6 to 8 numbers) <== my input string

0916532F | call <sn0eup . 091A1640> | ;Generate 128bit Value ($str_user_code, $Buffer_Result, $key)

; Function Begin

091A1640 | sub esp , 10 |

091A1643 | push ebx |

091A1644 | mov ebx , dword ptr ss : [ esp + 18 ] |

091A1648 | push ebp |

091A1649 | push esi |

091A164A | mov eax , dword ptr ds : [ ebx ] |

091A164C | push edi |

091A164D | mov edi , dword ptr ss : [ esp + 2C ] |

091A1651 | mov ecx , eax |

091A1653 | ror ecx , 8 |

091A1656 | mov esi , dword ptr ds : [ edi ] |

091A1658 | and ecx , FF00FF00 |

091A165E | rol eax , 8 |

091A1661 | and eax , FF00FF |

091A1666 | or ecx , eax |

091A1668 | mov eax , dword ptr ds : [ ebx + 4 ] |

091A166B | xor ecx , esi |

091A166D | mov esi , eax |

091A166F | ror esi , 8 |

091A1672 | and esi , FF00FF00 |

091A1678 | mov dword ptr ss : [ esp + 1C ] , ecx |

091A167C | rol eax , 8 |

091A167F | and eax , FF00FF |

091A1684 | or esi , eax |

091A1686 | mov eax , dword ptr ds : [ edi + 4 ] |

091A1689 | xor esi , eax |

091A168B | mov eax , dword ptr ds : [ ebx + 8 ] |

091A168E | mov edx , eax |

091A1690 | mov ebx , dword ptr ds : [ ebx + C ] |

091A1693 | ror edx , 8 |

091A1696 | and edx , FF00FF00 |

091A169C | mov dword ptr ss : [ esp + 2C ] , esi |

091A16A0 | rol eax , 8 |

091A16A3 | and eax , FF00FF |

091A16A8 | or edx , eax |

091A16AA | mov eax , dword ptr ds : [ edi + 8 ] |

091A16AD | xor edx , eax |

091A16AF | mov eax , ebx |

091A16B1 | ror eax , 8 |

091A16B4 | and eax , FF00FF00 |

091A16B9 | mov dword ptr ss : [ esp + 10 ] , edx |

091A16BD | rol ebx , 8 |

091A16C0 | and ebx , FF00FF |

091A16C6 | or eax , ebx |

091A16C8 | mov ebx , dword ptr ds : [ edi + C ] |

091A16CB | xor eax , ebx |

091A16CD | xor ebx , ebx |

091A16CF | mov bl , dh |

091A16D1 | mov dword ptr ss : [ esp + 14 ] , eax |

091A16D5 | shr esi , 18 |

091A16D8 | mov edx , dword ptr ds : [ ebx * 4 + 92219E8 ] |

091A16DF | xor ebx , ebx |

091A16E1 | mov bl , byte ptr ss : [ esp + 2E ] |

091A16E5 | mov ebp , dword ptr ds : [ ebx * 4 + 92215E8 ] |

091A16EC | mov ebx , ecx |

091A16EE | shr ebx , 18 |

091A16F1 | xor edx , ebp |

091A16F3 | mov ebp , dword ptr ds : [ ebx * 4 + 92211E8 ] |

091A16FA | mov ebx , eax |

091A16FC | and ebx , FF |

091A1702 | xor edx , ebp |

091A1704 | mov ebp , dword ptr ds : [ ebx * 4 + 9221DE8 ] |

091A170B | xor ebx , ebx |

091A170D | mov bl , ah |

091A170F | xor edx , ebp |

091A1711 | mov ebp , dword ptr ds : [ edi + 10 ] |

091A1714 | xor eax , eax |

091A1716 | mov al , byte ptr ss : [ esp + 12 ] |

091A171A | xor edx , ebp |

091A171C | mov ebp , dword ptr ds : [ ebx * 4 + 92219E8 ] |

091A1723 | mov dword ptr ss : [ esp + 18 ] , edx |

091A1727 | mov ebx , dword ptr ds : [ eax * 4 + 92215E8 ] |

091A172E | mov eax , ecx |

091A1730 | xor ebp , ebx |

091A1732 | mov ebx , dword ptr ds : [ esi * 4 + 92211E8 ] |

091A1739 | mov esi , dword ptr ds : [ edi + 14 ] |

091A173C | and eax , FF |

091A1741 | xor ebp , ebx |

091A1743 | xor ebp , dword ptr ds : [ eax * 4 + 9221DE8 ] |

091A174A | xor ebp , esi |

091A174C | mov dword ptr ss : [ esp + 24 ] , ebp |

091A1750 | xor eax , eax |

091A1752 | xor ebx , ebx |

091A1754 | mov al , byte ptr ss : [ esp + 16 ] |

091A1758 | mov bl , ch |

091A175A | mov eax , dword ptr ds : [ eax * 4 + 92215E8 ] |

091A1761 | mov ecx , dword ptr ds : [ ebx * 4 + 92219E8 ] |

091A1768 | xor eax , ecx |

091A176A | mov ecx , dword ptr ss : [ esp + 10 ] |

091A176E | shr ecx , 18 |

091A1771 | mov esi , dword ptr ds : [ ecx * 4 + 92211E8 ] |

091A1778 | mov ecx , dword ptr ss : [ esp + 2C ] |

091A177C | xor eax , esi |

091A177E | mov esi , ecx |

091A1780 | and esi , FF |

091A1786 | mov ebx , dword ptr ds : [ esi * 4 + 9221DE8 ] |

091A178D | xor eax , ebx |

091A178F | mov ebx , dword ptr ds : [ edi + 18 ] |

091A1792 | xor eax , ebx |

091A1794 | xor ebx , ebx |

091A1796 | mov bl , ch |

091A1798 | mov dword ptr ss : [ esp + 2C ] , eax |

091A179C | mov ecx , dword ptr ds : [ ebx * 4 + 92219E8 ] |

091A17A3 | xor ebx , ebx |

091A17A5 | mov bl , byte ptr ss : [ esp + 1E ] |

091A17A9 | mov esi , dword ptr ds : [ ebx * 4 + 92215E8 ] |

091A17B0 | xor ecx , esi |

091A17B2 | mov esi , dword ptr ss : [ esp + 14 ] |

091A17B6 | shr esi , 18 |

091A17B9 | mov ebx , dword ptr ds : [ esi * 4 + 92211E8 ] |

091A17C0 | mov esi , dword ptr ss : [ esp + 10 ] |

091A17C4 | and esi , FF |

091A17CA | xor ecx , ebx |

091A17CC | mov ebx , dword ptr ds : [ esi * 4 + 9221DE8 ] |

091A17D3 | mov esi , dword ptr ds : [ edi + 1C ] |

091A17D6 | xor ecx , ebx |

091A17D8 | xor ecx , esi |

091A17DA | lea esi , dword ptr ds : [ edi + 20 ] |

091A17DD | mov edi , dword ptr ds : [ edi + F0 ] |

091A17E3 | mov dword ptr ss : [ esp + 14 ] , ecx |

091A17E7 | sar edi , 1 |

091A17E9 | dec edi |

091A17EA | je sn0eup . 91A1A20 |

091A17F0 | mov ebp , edi |

091A17F2 | xor edx , edx |

091A17F4 | xor ebx , ebx |

091A17F6 | mov bl , byte ptr ss : [ esp + 26 ] |

091A17FA | mov dl , ah |

091A17FC | mov edi , dword ptr ds : [ edx * 4 + 92219E8 ] |

091A1803 | mov edx , dword ptr ds : [ ebx * 4 + 92215E8 ] |

091A180A | xor edi , edx |

091A180C | mov edx , dword ptr ss : [ esp + 18 ] |

091A1810 | mov ebx , edx |

091A1812 | shr ebx , 18 |

091A1815 | xor edi , dword ptr ds : [ ebx * 4 + 92211E8 ] |

091A181C | mov ebx , ecx |

091A181E | and ebx , FF |

091A1824 | xor edi , dword ptr ds : [ ebx * 4 + 9221DE8 ] |

091A182B | mov ebx , dword ptr ds : [ esi ] |

091A182D | xor edi , ebx |

091A182F | xor ebx , ebx |

091A1831 | mov bl , ch |

091A1833 | mov dword ptr ss : [ esp + 1C ] , edi |

091A1837 | mov ecx , dword ptr ds : [ ebx * 4 + 92219E8 ] |

091A183E | xor ebx , ebx |

091A1840 | mov bl , byte ptr ss : [ esp + 2E ] |

091A1844 | mov edi , dword ptr ds : [ ebx * 4 + 92215E8 ] |

091A184B | xor ecx , edi |

091A184D | mov edi , dword ptr ss : [ esp + 24 ] |

091A1851 | shr edi , 18 |

091A1854 | mov ebx , dword ptr ds : [ edi * 4 + 92211E8 ] |

091A185B | mov edi , edx |

091A185D | and edi , FF |

091A1863 | xor ecx , ebx |

091A1865 | mov ebx , dword ptr ds : [ edi * 4 + 9221DE8 ] |

091A186C | mov edi , dword ptr ds : [ esi + 4 ] |

091A186F | xor ecx , ebx |

091A1871 | xor ebx , ebx |

091A1873 | xor ecx , edi |

091A1875 | mov bl , dh |

091A1877 | mov dword ptr ss : [ esp + 2C ] , ecx |

091A187B | xor ecx , ecx |

091A187D | mov cl , byte ptr ss : [ esp + 16 ] |

091A1881 | mov edx , dword ptr ds : [ ebx * 4 + 92219E8 ] |

091A1888 | mov ecx , dword ptr ds : [ ecx * 4 + 92215E8 ] |

091A188F | xor ecx , edx |

091A1891 | mov edx , eax |

091A1893 | shr edx , 18 |

091A1896 | and eax , FF |

091A189B | mov edi , dword ptr ds : [ edx * 4 + 92211E8 ] |

091A18A2 | mov edx , dword ptr ss : [ esp + 24 ] |

091A18A6 | xor ecx , edi |

091A18A8 | mov edi , edx |

091A18AA | and edi , FF |

091A18B0 | mov ebx , dword ptr ds : [ edi * 4 + 9221DE8 ] |

091A18B7 | xor ecx , ebx |

091A18B9 | mov ebx , dword ptr ds : [ esi + 8 ] |

091A18BC | xor ecx , ebx |

091A18BE | xor ebx , ebx |

091A18C0 | mov bl , dh |

091A18C2 | mov dword ptr ss : [ esp + 10 ] , ecx |

091A18C6 | mov edx , dword ptr ds : [ ebx * 4 + 92219E8 ] |

091A18CD | xor ebx , ebx |

091A18CF | mov bl , byte ptr ss : [ esp + 1A ] |

091A18D3 | mov edi , dword ptr ds : [ ebx * 4 + 92215E8 ] |

091A18DA | xor edx , edi |

091A18DC | mov edi , dword ptr ss : [ esp + 14 ] |

091A18E0 | shr edi , 18 |

091A18E3 | mov ebx , dword ptr ds : [ edi * 4 + 92211E8 ] |

091A18EA | mov edi , dword ptr ds : [ esi + C ] |

091A18ED | xor edx , ebx |

091A18EF | mov ebx , dword ptr ds : [ eax * 4 + 9221DE8 ] |

091A18F6 | xor edx , ebx |

091A18F8 | xor eax , eax |

091A18FA | xor ebx , ebx |

091A18FC | mov al , ch |

091A18FE | mov bl , byte ptr ss : [ esp + 2E ] |

091A1902 | xor edx , edi |

091A1904 | mov edi , dword ptr ds : [ eax * 4 + 92219E8 ] |

091A190B | mov dword ptr ss : [ esp + 14 ] , edx |

091A190F | mov eax , dword ptr ds : [ ebx * 4 + 92215E8 ] |

091A1916 | xor edi , eax |

091A1918 | mov eax , dword ptr ss : [ esp + 1C ] |

091A191C | mov ebx , eax |

091A191E | shr ebx , 18 |

091A1921 | xor edi , dword ptr ds : [ ebx * 4 + 92211E8 ] |

091A1928 | mov ebx , edx |

091A192A | and ebx , FF |

091A1930 | add esi , 20 |

091A1933 | xor edi , dword ptr ds : [ ebx * 4 + 9221DE8 ] |

091A193A | mov ebx , dword ptr ds : [ esi - 10 ] |

091A193D | xor edi , ebx |

091A193F | xor ebx , ebx |

091A1941 | mov bl , dh |

091A1943 | xor edx , edx |

091A1945 | mov dl , byte ptr ss : [ esp + 12 ] |

091A1949 | mov dword ptr ss : [ esp + 18 ] , edi |

091A194D | mov edi , dword ptr ds : [ ebx * 4 + 92219E8 ] |

091A1954 | mov ebx , dword ptr ds : [ edx * 4 + 92215E8 ] |

091A195B | mov edx , dword ptr ss : [ esp + 2C ] |

091A195F | shr edx , 18 |

091A1962 | xor edi , ebx |

091A1964 | mov ebx , dword ptr ds : [ edx * 4 + 92211E8 ] |

091A196B | mov edx , eax |

091A196D | and edx , FF |

091A1973 | xor edi , ebx |

091A1975 | mov ebx , dword ptr ds : [ edx * 4 + 9221DE8 ] |

091A197C | xor edx , edx |

091A197E | mov dl , byte ptr ss : [ esp + 16 ] |

091A1982 | xor edi , ebx |

091A1984 | mov ebx , dword ptr ds : [ esi - C ] |

091A1987 | xor edi , ebx |

091A1989 | xor ebx , ebx |

091A198B | mov bl , ah |

091A198D | mov eax , dword ptr ds : [ edx * 4 + 92215E8 ] |

091A1994 | mov dword ptr ss : [ esp + 24 ] , edi |

091A1998 | mov edx , dword ptr ds : [ ebx * 4 + 92219E8 ] |

091A199F | xor eax , edx |

091A19A1 | mov edx , ecx |

091A19A3 | shr edx , 18 |

091A19A6 | and ecx , FF |

091A19AC | mov edi , dword ptr ds : [ edx * 4 + 92211E8 ] |

091A19B3 | mov edx , dword ptr ss : [ esp + 2C ] |

091A19B7 | xor eax , edi |

091A19B9 | mov edi , edx |

091A19BB | and edi , FF |

091A19C1 | mov ebx , dword ptr ds : [ edi * 4 + 9221DE8 ] |

091A19C8 | mov edi , dword ptr ds : [ esi - 8 ] |

091A19CB | xor eax , ebx |

091A19CD | xor ebx , ebx |

091A19CF | mov bl , dh |

091A19D1 | xor edx , edx |

091A19D3 | mov dl , byte ptr ss : [ esp + 1E ] |

091A19D7 | xor eax , edi |

091A19D9 | mov edi , dword ptr ds : [ ebx * 4 + 92219E8 ] |

091A19E0 | mov dword ptr ss : [ esp + 2C ] , eax |

091A19E4 | mov ebx , dword ptr ds : [ edx * 4 + 92215E8 ] |

091A19EB | mov edx , dword ptr ss : [ esp + 14 ] |

091A19EF | shr edx , 18 |

091A19F2 | xor edi , ebx |

091A19F4 | mov ebx , dword ptr ds : [ edx * 4 + 92211E8 ] |

091A19FB | mov edx , dword ptr ds : [ ecx * 4 + 9221DE8 ] |

091A1A02 | xor edi , ebx |

091A1A04 | mov ebx , dword ptr ds : [ esi - 4 ] |

091A1A07 | xor edi , edx |

091A1A09 | xor edi , ebx |

091A1A0B | dec ebp |

091A1A0C | mov ecx , edi |

091A1A0E | mov dword ptr ss : [ esp + 14 ] , ecx |

091A1A12 | jnz sn0eup . 91A17F2 |

091A1A18 | mov edx , dword ptr ss : [ esp + 18 ] |

091A1A1C | mov ebp , dword ptr ss : [ esp + 24 ] |

091A1A20 | xor ebx , ebx |

091A1A22 | mov bl , byte ptr ss : [ esp + 26 ] |

091A1A26 | shr ebp , 18 |

091A1A29 | mov edi , dword ptr ds : [ ebx * 4 + 92221E8 ] |

091A1A30 | xor ebx , ebx |

091A1A32 | mov bl , ah |

091A1A34 | and edi , FF0000 |

091A1A3A | mov ebx , dword ptr ds : [ ebx * 4 + 92221E8 ] |

091A1A41 | and ebx , FF00 |

091A1A47 | xor edi , ebx |

091A1A49 | mov ebx , edx |

091A1A4B | shr ebx , 18 |

091A1A4E | mov ebx , dword ptr ds : [ ebx * 4 + 92221E8 ] |

091A1A55 | and ebx , FF000000 |

091A1A5B | xor edi , ebx |

091A1A5D | mov ebx , ecx |

091A1A5F | and ebx , FF |

091A1A65 | mov ebx , dword ptr ds : [ ebx * 4 + 92221E8 ] |

091A1A6C | and ebx , FF |

091A1A72 | xor edi , ebx |

091A1A74 | mov ebx , dword ptr ds : [ esi ] |

091A1A76 | xor edi , ebx |

091A1A78 | mov ebx , edi |

091A1A7A | ror ebx , 8 |

091A1A7D | and ebx , FF00FF00 |

091A1A83 | rol edi , 8 |

091A1A86 | and edi , FF00FF |

091A1A8C | or ebx , edi |

091A1A8E | mov edi , dword ptr ss : [ esp + 28 ] | ;[esp+28]:Code2

091A1A92 | mov dword ptr ds : [ edi ] , ebx |

091A1A94 | xor ebx , ebx |

091A1A96 | mov bl , byte ptr ss : [ esp + 2E ] |

091A1A9A | mov edi , dword ptr ds : [ ebx * 4 + 92221E8 ] |

091A1AA1 | xor ebx , ebx |

091A1AA3 | mov bl , ch |

091A1AA5 | and edi , FF0000 |

091A1AAB | mov ebx , dword ptr ds : [ ebx * 4 + 92221E8 ] |

091A1AB2 | and ebx , FF00 |

091A1AB8 | xor edi , ebx |

091A1ABA | mov ebx , dword ptr ds : [ ebp * 4 + 92221E8 ] |

091A1AC1 | and ebx , FF000000 |

091A1AC7 | mov ebp , dword ptr ss : [ esp + 28 ] | ;[esp+28]:Code2

091A1ACB | xor edi , ebx |

091A1ACD | mov ebx , edx |

091A1ACF | and ebx , FF |

091A1AD5 | mov ebx , dword ptr ds : [ ebx * 4 + 92221E8 ] |

091A1ADC | and ebx , FF |

091A1AE2 | xor edi , ebx |

091A1AE4 | mov ebx , dword ptr ds : [ esi + 4 ] |

091A1AE7 | xor edi , ebx |

091A1AE9 | mov ebx , edi |

091A1AEB | ror ebx , 8 |

091A1AEE | and ebx , FF00FF00 |

091A1AF4 | rol edi , 8 |

091A1AF7 | and edi , FF00FF |

091A1AFD | or ebx , edi |

091A1AFF | mov dword ptr ss : [ ebp + 4 ] , ebx |

091A1B02 | xor ebx , ebx |

091A1B04 | mov bl , byte ptr ss : [ esp + 16 ] |

091A1B08 | mov edi , dword ptr ds : [ ebx * 4 + 92221E8 ] |

091A1B0F | xor ebx , ebx |

091A1B11 | mov bl , dh |

091A1B13 | and edi , FF0000 |

091A1B19 | mov edx , dword ptr ds : [ ebx * 4 + 92221E8 ] |

091A1B20 | and edx , FF00 |

091A1B26 | xor edi , edx |

091A1B28 | mov edx , eax |

091A1B2A | shr edx , 18 |

091A1B2D | mov edx , dword ptr ds : [ edx * 4 + 92221E8 ] |

091A1B34 | and edx , FF000000 |

091A1B3A | xor edi , edx |

091A1B3C | mov edx , dword ptr ss : [ esp + 24 ] |

091A1B40 | mov ebx , edx |

091A1B42 | and ebx , FF |

091A1B48 | mov ebx , dword ptr ds : [ ebx * 4 + 92221E8 ] |

091A1B4F | and ebx , FF |

091A1B55 | xor edi , ebx |

091A1B57 | mov ebx , dword ptr ds : [ esi + 8 ] |

091A1B5A | xor edi , ebx |

091A1B5C | mov ebx , edi |

091A1B5E | ror ebx , 8 |

091A1B61 | and ebx , FF00FF00 |

091A1B67 | and eax , FF |

091A1B6C | rol edi , 8 |

091A1B6F | and edi , FF00FF |

091A1B75 | or ebx , edi |

091A1B77 | mov dword ptr ss : [ ebp + 8 ] , ebx |

091A1B7A | xor ebx , ebx |

091A1B7C | mov bl , byte ptr ss : [ esp + 1A ] |

091A1B80 | shr ecx , 18 |

091A1B83 | mov edi , dword ptr ds : [ ebx * 4 + 92221E8 ] |

091A1B8A | xor ebx , ebx |

091A1B8C | mov ecx , dword ptr ds : [ ecx * 4 + 92221E8 ] |

091A1B93 | mov bl , dh |

091A1B95 | and edi , FF0000 |

091A1B9B | and ecx , FF000000 |

091A1BA1 | mov edx , dword ptr ds : [ ebx * 4 + 92221E8 ] |

091A1BA8 | and edx , FF00 |

091A1BAE | xor edi , edx |

091A1BB0 | mov edx , dword ptr ds : [ eax * 4 + 92221E8 ] |

091A1BB7 | xor edi , ecx |

091A1BB9 | and edx , FF |

091A1BBF | xor edi , edx |

091A1BC1 | mov edx , dword ptr ds : [ esi + C ] |

091A1BC4 | xor edi , edx |

091A1BC6 | mov eax , edi |

091A1BC8 | ror eax , 8 |

091A1BCB | and eax , FF00FF00 |

091A1BD0 | rol edi , 8 |

091A1BD3 | and edi , FF00FF |

091A1BD9 | or eax , edi |

091A1BDB | pop edi |

091A1BDC | mov dword ptr ss : [ ebp + C ] , eax |

091A1BDF | pop esi |

091A1BE0 | pop ebp |

091A1BE1 | pop ebx |

091A1BE2 | add esp , 10 |