Function at 0x4057d0
Capabilities:
Get common file path
Get disk information
Get system information on windows
Query or enumerate registry value
Read .ini file
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x409906
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x554
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push ebx
lea ecx, [esp + 0x9c]
call fcn.00406f10
xor eax, eax
mov ecx, 0x25
lea edi, [esp + 0x2c0]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c0]
push eax
mov dword [esp + 0x570], ebx
xor ebp, ebp
mov dword [esp + 0x2c4], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x2d0]
sub eax, ebx
je 0x405bc4
dec eax
je 0x40585d
dec eax
jne 0x405870
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x358]
rep stosd dword es:[edi], eax
jmp 0x405870
mov esi, 0xfe000
mov ecx, 0x40
lea edi, [esp + 0x358]
rep movsd dword es:[edi], dword [esi]
xor eax, eax
movsx ecx, byte [esp + eax + 0x358]
add ebp, ecx
inc eax
cmp eax, 0x100
jl 0x405872
push ebx
push ebx
push ebx
push ebx
lea edx, [esp + 0x58]
push edx
push ebx
push ebx
push 0x40b198
mov dword [esp + 0x30], ebp
mov dword [esp + 0x190], ebx
mov dword [esp + 0x194], ebx
mov dword [esp + 0x198], ebx
mov dword [esp + 0x19c], ebx
mov dword [esp + 0x1a0], ebx
mov dword [esp + 0x1a4], ebx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
push 0x104
lea eax, [esp + 0x45c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea ecx, [esp + 0x170]
push ecx
lea edx, [esp + 0x45c]
push edx
call sub.MFC70.DLL_Ordinal_3196
lea eax, [esp + 0x29c]
push eax
lea ecx, [esp + 0x45c]
push ecx
call dword [sym.imp.MSVCR70.dll__stat]
add esp, 8
lea edx, [esp + 0x74]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
lea eax, [esp + 0x18]
push eax
push 0x20019
push ebx
push str.SoftwareHuDongHD_SPDR2000
push 0x80000002
mov dword [esp + 0x4c], 0xa
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebp, dword [sym.imp.MSVCR70.dll_sprintf]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, eax
cmp esi, ebx
jne 0x405969
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x40]
push edx
push ebx
push ebx
push str.RandNumber
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4059d9
push ebx
call dword [sym.imp.MSVCR70.dll_time]
push eax
call dword [sym.imp.MSVCR70.dll_srand]
call dword [sym.imp.MSVCR70.dll_rand]
push eax
lea ecx, [esp + 0x48]
push str._05d
push ecx
call ebp
add esp, 0x14
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x18]
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push str.SoftwareHuDongHD_SPDR2000
push 0x80000002
mov dword [esp + 0x38], ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov edx, dword [esp + 0x14]
push 0xa
lea ecx, [esp + 0x40]
push ecx
push 1
push ebx
push str.RandNumber
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 0x14]
push eax
call edi
cmp esi, ebx
jne 0x4059e0
mov ecx, dword [esp + 0x18]
push ecx
call edi
mov esi, dword [esp + 0x170]
mov edi, dword [esp + 0x174]
lea edx, [esp + 0x3c]
push edx
call dword [sym.imp.MSVCR70.dll_atoi]
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x14]
add esp, 4
push eax
movzx eax, word [esp + 0x9a]
add eax, edx
cdq
xor eax, edx
sub eax, edx
push eax
mov eax, dword [esp + 0x50]
cdq
xor eax, edx
sub eax, edx
push eax
push ebx
push 0x186a0
push edi
push esi
call fcn.00409150
cdq
xor eax, edx
sub eax, edx
push eax
lea eax, [esp + 0x2c]
push str._05d_010d_05d_05d
push eax
call ebp
mov cl, byte [esp + 0x3d]
mov al, byte [esp + 0x34]
mov dl, byte [esp + 0x39]
mov byte [esp + 0x34], cl
mov cl, byte [esp + 0x46]
mov byte [esp + 0x39], cl
mov cl, byte [esp + 0x4b]
mov byte [esp + 0x4d], al
mov byte [esp + 0x3d], dl
mov dl, byte [esp + 0x37]
mov byte [esp + 0x4b], al
lea eax, [esp + 0x34]
mov byte [esp + 0x37], cl
add esp, 0x18
mov byte [esp + 0x2e], dl
lea ecx, [eax + 1]
lea ecx, [ecx]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x405a80
sub eax, ecx
push eax
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x170]
call fcn.004024e0
push 0x19
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x170]
call fcn.004048e0
mov eax, dword [eax]
mov esi, dword [esp + 0x168]
lea ecx, [eax - 0x10]
add esi, 0xfffffff0
cmp ecx, esi
mov byte [esp + 0x56c], 1
je 0x405b0f
mov edx, dword [esi + 0xc]
cmp edx, ebx
lea edi, [esi + 0xc]
jge 0x405ae6
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x170]
call fcn.004024e0
jmp 0x405b0f
push ecx
call fcn.00402a00
add esp, 4
mov ebp, eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x405b05
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
add ebp, 0x10
mov dword [esp + 0x168], ebp
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x56c], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405b34
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push str.HDSPD.INI
push 0x20
lea eax, [esp + 0x5c]
push eax
push 0x40a8e0
push str.RegID
push str.R2000
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0x54]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405b60
sub eax, edx
push eax
lea ecx, [esp + 0x58]
push ecx
lea ecx, [esp + 0x16c]
call fcn.004024e0
lea ecx, [esp + 0x98]
call sub.MFC70.DLL_Ordinal_1870
cmp eax, 1
jne 0x405ba9
mov edx, dword [esp + 0x164]
push str.HDSPD.INI
push edx
push str.RegID
push str.R2000
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
call fcn.004027c0
test eax, eax
jne 0x405bd0
call fcn.00402720
test eax, eax
je 0x405bd0
push ebx
push ebx
push 0x40ab90
jmp 0x405bcb
push ebx
push ebx
push str.Win32s_is_not_supported_by_this_programm.
call sub.MFC70.DLL_Ordinal_1014
lea ecx, [esp + 0x98]
mov dword [esp + 0x56c], 0xffffffff
call fcn.00404630
mov ecx, dword [esp + 0x564]
pop edi
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret