joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406d20
Capabilities:
Get common file path
Get file version info

Disassembly:
sub esp, 0x110
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esp + 0x11c]
test edi, edi
jne 0x406d9c
lea eax, [esp + 0x14]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x406d6a
pop edi
xor ax, ax
pop esi
add esp, 0x110
ret 4
mov edi, str.user32.dll
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x18]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
pop ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x406dbd
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xc]
lea edx, [esp + 0x14]
push ecx
push edx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov edi, eax
test edi, edi
jne 0x406de0
pop edi
xor ax, ax
pop esi
add esp, 0x110
ret 4
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x406dfd
pop edi
xor ax, ax
pop esi
add esp, 0x110
ret 4
mov eax, dword [esp + 0xc]
push esi
push edi
lea ecx, [esp + 0x1c]
push eax
push ecx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x406e27
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
xor ax, ax
pop esi
add esp, 0x110
ret 4
lea edx, [esp + 0x10]
lea eax, [esp + 8]
push edx
push eax
push str.VarFileInfoTranslation
push esi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x406e55
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
xor ax, ax
pop esi
add esp, 0x110
ret 4
mov ecx, dword [esp + 8]
push esi
mov di, word [ecx]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ax, di
pop edi
pop esi
add esp, 0x110
ret 4
Function at 0x406e80
Capabilities:
Get common file path
Read .ini file

Disassembly:
sub esp, 0x184
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 5]
mov byte [esp + 4], 0
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x406ebb
xor ax, ax
pop edi
add esp, 0x184
ret
mov edi, str.Fuhjin.ini
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push esi
lea edx, [esp + 0xc]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0xc]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x114]
push 0x80
push ecx
push 0x42af84
push str.LangID
push str.FXEZ_LANG
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
pop esi
pop ebx
test eax, eax
jne 0x406f23
xor ax, ax
pop edi
add esp, 0x184
ret
lea edx, [esp + 0x108]
push edx
call fcn.0040b2b0
add esp, 4
pop edi
add esp, 0x184
ret

Function at 0x4079b0
Capabilities:
Check os version

Disassembly:
sub esp, 0x98
lea eax, [esp + 4]
push esi
push eax
mov dword [esp + 0xc], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x407ad5
mov eax, dword [esp + 0x18]
dec eax
je 0x407abc
dec eax
jne 0x407ad5
mov eax, dword [esp + 0xc]
cmp eax, 4
jne 0x407a06
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x407ad5
mov eax, 2
pop esi
add esp, 0x98
ret
cmp eax, 5
jne 0x407a62
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407aaf
cmp eax, 1
je 0x407aaf
cmp eax, 2
jne 0x407ad5
push str.IsWow64Process
push str.kernel32.dll
mov dword [esp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x407aaf
lea ecx, [esp + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
mov eax, dword [esp + 4]
jmp 0x407a9e
cmp eax, 6
jne 0x407ad5
push str.IsWow64Process
push str.kernel32.dll
mov dword [esp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x407aaf
lea edx, [esp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
mov eax, dword [esp + 4]
test eax, eax
je 0x407aaf
mov eax, 4
pop esi
add esp, 0x98
ret
mov eax, 3
pop esi
add esp, 0x98
ret
mov eax, dword [esp + 0x14]
pop esi
and eax, 0xffff0000
cmp eax, 0x40a0000
sbb eax, eax
inc eax
add esp, 0x98
ret
or eax, 0xffffffff
pop esi
add esp, 0x98
ret
Function at 0x407eb0
Capabilities:
Get file version info

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x318
lea ecx, [esp + 0x110]
push ebp
push esi
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x11c]
push str..exe
push edx
call ebp
lea eax, [esp + 0x14]
lea ecx, [esp + 0x11c]
push eax
push ecx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov edi, eax
test edi, edi
jne 0x407f03
pop edi
pop esi
pop ebp
add esp, 0x318
ret
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x407f1c
pop edi
pop esi
pop ebp
add esp, 0x318
ret
mov edx, dword [esp + 0x14]
push esi
push edi
lea eax, [esp + 0x124]
push edx
push eax
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x407f47
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x318
ret
lea ecx, [esp + 0x10]
lea edx, [esp + 0xc]
push ecx
push edx
push str.VarFileInfoTranslation
push esi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x407f73
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x318
ret
mov eax, dword [esp + 0xc]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
xor edx, edx
mov ecx, dword [eax]
mov dx, word [eax]
shr ecx, 0x10
push ecx
push edx
lea eax, [esp + 0x228]
push str._04X_04X
push eax
call edi
lea ecx, [esp + 0x230]
lea edx, [esp + 0x28]
push ecx
push str.StringFileInfo_sFileDescription
push edx
call edi
add esp, 0x1c
lea eax, [esp + 0x10]
lea ecx, [esp + 0xc]
lea edx, [esp + 0x18]
push eax
push ecx
push edx
push esi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x407fdb
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x318
ret
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x32c]
push eax
push ecx
call ebp
lea edx, [esp + 0x220]
lea eax, [esp + 0x18]
push edx
push str.StringFileInfo_sFileVersion
push eax
call edi
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0xc]
lea eax, [esp + 0x18]
push ecx
push edx
push eax
push esi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x40802d
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x318
ret
mov ecx, dword [esp + 0x33c]
mov edx, dword [esp + 0x338]
push ebx
push 0x11f
push ecx
push edx
call fcn.00408b60
mov ebx, dword [esp + 0x340]
add esp, 0xc
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esp + 0x10]
push eax
push ebx
call ebp
lea ecx, [esp + 0x224]
lea edx, [esp + 0x1c]
push ecx
push str.StringFileInfo_sLegalCopyright
push edx
call edi
add esp, 0xc
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x1c]
push eax
push ecx
push edx
push esi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
pop ebx
jne 0x4080a6
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x318
ret
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x334]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x318
ret
Function at 0x4080d0
Capabilities:
Delete file
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call fcn.00407b40
add esp, 4
test eax, eax
jne 0x4080e9
mov eax, 1
pop esi
ret
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop esi
ret

Function at 0x408100
Capabilities:
Delete file
Move file
Read .ini file
Set file attributes

Disassembly:
sub esp, 0x21c
push ebx
mov ebx, dword [esp + 0x224]
push esi
push edi
push ebx
call fcn.00407b40
add esp, 4
test eax, eax
je 0x40829b
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
call fcn.004079b0
test eax, eax
je 0x4081f2
cmp eax, 1
je 0x4081f2
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov ecx, dword [esp + 0x1a]
mov eax, 0x66666667
and ecx, 0xffff
imul ecx
sar edx, 2
mov ecx, edx
mov eax, dword [esp + 0x16]
shr ecx, 0x1f
add edx, ecx
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x1c]
and edx, 0xffff
and eax, 0xffff
push edx
and ecx, 0xffff
push eax
push ecx
lea edx, [esp + 0x134]
push str.._02d_02d_02d_02d
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
lea eax, [esp + 0x20]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x124]
lea edx, [esp + 0x20]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExA]
lea eax, [esp + 0x20]
push 0
push eax
push ebx
call esi
test eax, eax
jne 0x4081dd
pop edi
pop esi
pop ebx
add esp, 0x21c
ret
push 4
lea ecx, [esp + 0x24]
push 0
push ecx
call esi
pop edi
pop esi
pop ebx
add esp, 0x21c
ret
push 0x7fff
call fcn.0041739f
add esp, 4
mov edi, eax
push str.WININIT.INI
push 0x7fff
push edi
push str.Rename
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
mov al, byte [edi]
mov esi, edi
test al, al
je 0x408232
mov dl, byte [esi]
inc esi
test dl, dl
je 0x40822d
mov al, byte [esi]
inc esi
test al, al
jne 0x408226
cmp byte [esi], 0
jne 0x40821f
push str.NUL
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov cl, byte [esi]
inc esi
test cl, cl
je 0x408254
mov dl, byte [esi]
inc esi
test dl, dl
jne 0x40824d
push str.WININIT.INI
push edi
push str.Rename
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileSectionA]
test eax, eax
jne 0x408281
push edi
call fcn.004173c8
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x21c
ret
push str.WININIT.INI
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push edi
call fcn.004173c8
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x21c
ret
Function at 0x408390
Capabilities:
Query or enumerate registry value

Disassembly:
mov ecx, dword [esp + 8]
sub esp, 0x10c
mov edx, dword [esp + 0x110]
lea eax, [esp]
push ebp
push esi
push edi
push eax
push 9
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4083c5
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x10c
ret
mov edx, dword [esp + 0xc]
xor esi, esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
push esi
push esi
push esi
lea eax, [esp + 0x1c]
push esi
lea ecx, [esp + 0x24]
push eax
push ecx
push esi
push edx
mov dword [esp + 0x30], 0x104
call edi
test eax, eax
jne 0x40842d
mov ebp, dword [esp + 0x124]
lea eax, [esp + 0x14]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x408444
mov eax, dword [esp + 0xc]
push 0
push 0
push 0
lea ecx, [esp + 0x1c]
push 0
lea edx, [esp + 0x24]
inc esi
push ecx
push edx
push esi
push eax
mov dword [esp + 0x30], 0x104
call edi
test eax, eax
je 0x4083f6
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x10c
ret
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x10c
ret
Function at 0x408460
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41f776
push eax
mov dword fs:[0], esp
sub esp, 0x128
push ebx
push esi
mov esi, dword [esp + 0x144]
push edi
mov edi, dword [esp + 0x144]
push esi
push edi
call fcn.00408350
add esp, 8
test eax, eax
je 0x408624
lea eax, [esp + 0x10]
xor ebx, ebx
push eax
push 8
push ebx
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
je 0x4084bb
xor eax, eax
jmp 0x408629
push 0xa
lea ecx, [esp + 0x18]
call fcn.00415d51
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push ebx
push ebx
push ebx
lea ecx, [esp + 0x18]
push ebx
lea edx, [esp + 0x40]
push ecx
push edx
push ebx
push eax
mov dword [esp + 0x15c], ebx
xor esi, esi
mov dword [esp + 0x2c], 0x104
call edi
cmp eax, ebx
jne 0x408528
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x18]
call fcn.00415e59
mov ecx, dword [esp + 0x10]
push ebx
push ebx
push ebx
lea edx, [esp + 0x18]
push ebx
lea eax, [esp + 0x40]
inc esi
push edx
push eax
push esi
push ecx
mov dword [esp + 0x2c], 0x104
call edi
cmp eax, ebx
je 0x4084f7
cmp dword [esp + 0x20], ebx
je 0x408579
mov esi, dword [esp + 0x18]
cmp esi, ebx
je 0x408579
mov eax, esi
mov esi, dword [esi]
add eax, 8
lea ecx, [esp + 0xc]
push eax
call fcn.00417c67
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
push edx
push eax
mov byte [esp + 0x144], 1
call fcn.00408460
add esp, 8
cmp eax, ebx
je 0x4085ce
lea ecx, [esp + 0xc]
mov byte [esp + 0x13c], bl
call fcn.00417ed4
cmp esi, ebx
jne 0x408536
mov edx, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call esi
mov eax, dword [esp + 0x148]
mov ecx, dword [esp + 0x144]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
cmp eax, ebx
je 0x408610
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x10]
mov edi, eax
push edx
call esi
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [esp + 0x14]
mov dword [esp + 0x13c], 0xffffffff
call fcn.00415dc5
xor eax, eax
jmp 0x408629
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x10]
mov esi, eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [esp + 0xc]
mov byte [esp + 0x13c], bl
call fcn.00417ed4
lea ecx, [esp + 0x14]
mov dword [esp + 0x13c], 0xffffffff
call fcn.00415dc5
xor eax, eax
jmp 0x408629
lea ecx, [esp + 0x14]
mov dword [esp + 0x13c], 0xffffffff
call fcn.00415dc5
mov eax, 1
mov ecx, dword [esp + 0x134]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x134
ret
Function at 0x408650
Capabilities:
Delete registry value

Disassembly:
push ebx
mov ebx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
push ebx
push esi
push edi
call fcn.00408390
add esp, 0xc
test eax, eax
je 0x4086c7
lea eax, [esp + 0x18]
push eax
push 0xf003f
push 0
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40868c
pop edi
pop esi
xor eax, eax
pop ebx
ret
mov ecx, dword [esp + 0x18]
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
je 0x4086bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x18]
mov esi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
ret
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov eax, 1
pop ebx
ret

Function at 0x408820
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, dword [esp + 8]
mov edx, dword [esp + 4]
sub esp, 0xc
lea ecx, [esp + 4]
mov byte [eax], 0
push esi
push edi
push ecx
push edx
call fcn.004086d0
add esp, 8
test eax, eax
je 0x408943
mov edx, dword [esp + 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 8]
lea ecx, [esp + 0x10]
push eax
push 0
push ecx
push 0
push str.PrnID
push edx
mov dword [esp + 0x20], 0
call esi
test eax, eax
jne 0x408938
mov eax, dword [esp + 8]
test eax, eax
je 0x408938
push eax
call fcn.0041739f
mov edx, dword [esp + 0x10]
add esp, 4
mov edi, eax
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x14]
push edi
push ecx
push 0
push str.PrnID
push edx
call esi
test eax, eax
je 0x4088d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
push edi
call fcn.004173c8
add esp, 4
xor eax, eax
pop edi
pop esi
add esp, 0xc
ret
mov eax, dword [esp + 8]
xor esi, esi
test eax, eax
jle 0x408919
push ebx
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatA]
xor ecx, ecx
lea edx, [esp + 0x20]
mov cl, byte [esi + edi]
push ecx
push str._02X
push edx
call ebx
mov ecx, dword [esp + 0x30]
add esp, 0xc
lea eax, [esp + 0x20]
push eax
push ecx
call ebp
mov eax, dword [esp + 0x10]
inc esi
cmp esi, eax
jl 0x4088ed
pop ebp
pop ebx
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
call fcn.004173c8
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0xc
ret
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
add esp, 0xc
ret
Function at 0x408950
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov ecx, dword [esp + 8]
push ebx
mov ebx, dword [esp + 0x10]
push esi
lea eax, [esp + 0x14]
push edi
push eax
push ecx
mov byte [ebx], 0
call fcn.004086d0
add esp, 8
test eax, eax
je 0x408a30
mov ecx, dword [esp + 0x18]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0x14]
lea eax, [esp + 0xc]
push edx
push 0
push eax
push 0
push str.UserEntrySubPath
push ecx
mov dword [esp + 0x2c], 0
call edi
test eax, eax
jne 0x408a25
mov eax, dword [esp + 0x14]
test eax, eax
je 0x408a25
push eax
call fcn.0041739f
mov ecx, dword [esp + 0x1c]
add esp, 4
lea edx, [esp + 0x14]
mov esi, eax
push edx
lea eax, [esp + 0x10]
push esi
push eax
push 0
push str.UserEntrySubPath
push ecx
call edi
test eax, eax
je 0x4089ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x18]
mov edi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
call fcn.004173c8
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
pop ecx
ret
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call fcn.004173c8
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
pop ecx
ret
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov eax, 1
pop ebx
pop ecx
ret

Function at 0x408aa0
Capabilities:
Identify system language via api

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
xor ebx, ebx
push edi
mov dword [esp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov edi, eax
test di, di
jne 0x408ac4
push 0
call fcn.00407ae0
add esp, 4
and edi, 0xffff
mov eax, edi
and eax, 0x3ff
sub eax, 4
je 0x408af0
sub eax, 0xd
je 0x408ae9
dec eax
je 0x408ae2
xor edi, edi
jmp 0x408b18
mov edi, 0x3b5
jmp 0x408b18
mov edi, 0x3a4
jmp 0x408b18
and edi, 0xfffffc00
cmp edi, 0x400
je 0x408b13
cmp edi, 0xc00
je 0x408b13
cmp edi, 0x1400
mov edi, 0x3a8
jne 0x408b18
mov edi, 0x3b6
cmp byte [esi], 0
je 0x408b55
mov ebx, dword [sym.imp.KERNEL32.dll_IsDBCSLeadByteEx]
push ebp
mov ebp, dword [esp + 0x18]
mov al, byte [esi]
push eax
push edi
call ebx
test eax, eax
je 0x408b3b
test edi, edi
je 0x408b3b
add esi, 2
jmp 0x408b47
movsx ecx, byte [esi]
cmp ecx, ebp
jne 0x408b46
mov dword [esp + 0x14], esi
inc esi
cmp byte [esi], 0
jne 0x408b28
mov eax, dword [esp + 0x14]
pop ebp
pop edi
pop esi
pop ebx
ret
pop edi
mov eax, ebx
pop esi
pop ebx
ret
Function at 0x408b60
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x200
mov byte [0x42b0c8], 0
push ebp
mov ebp, dword [esp + 0x210]
mov eax, ebp
push esi
cdq
and edx, 0xf
push edi
add eax, edx
mov edi, dword [esp + 0x210]
mov esi, eax
mov eax, dword [esp + 0x214]
sar esi, 4
inc esi
push eax
and esi, 0xffff
push esi
push 6
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
test eax, eax
jne 0x408bb2
push 6
push esi
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, ebp
xor edx, edx
and ecx, 0x8000000f
jns 0x408bd4
dec ecx
or ecx, 0xfffffff0
inc ecx
js 0x408bf0
inc ecx
lea eax, [eax + edx*2]
xor edx, edx
mov dx, word [eax]
add eax, 2
dec ecx
jne 0x408bd5
cmp edx, 0xff
jl 0x408bf0
mov edx, 0xfe
add edx, edx
mov esi, eax
mov ecx, edx
lea edi, [esp + 0xc]
mov eax, ecx
push 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0
and ecx, 3
push 0x1fe
rep movsb byte es:[edi], byte [esi]
push 0x42b0c8
lea ecx, [esp + 0x1c]
push 0xffffffffffffffff
push ecx
push 0
push 0
mov word [esp + edx + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
pop edi
pop esi
mov eax, 0x42b0c8
pop ebp
add esp, 0x200
ret

Function at 0x409a29
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
lea eax, [ebp - 4]
push esi
xor esi, esi
push eax
push 0x20019
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x409a81
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x104
push eax
push dword [ebp + 8]
push esi
push esi
push 0x42af84
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x409a74
push 1
pop esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x409a83
xor eax, eax
pop esi
leave
ret 4
Function at 0x40ee05
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x427c58
cmp edx, dword [eax]
je 0x40ee27
add eax, 8
inc ecx
cmp eax, 0x427ce8
jl 0x40ee18
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x427c58]
jne 0x40ef55
mov eax, dword [0x42d698]
cmp eax, 1
je 0x40ef2f
test eax, eax
jne 0x40ee58
cmp dword [0x427668], 1
je 0x40ef2f
cmp edx, 0xfc
je 0x40ef55
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40ee8f
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.0040ffd0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.0040f000
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40eed2
lea eax, [ebp - 0x1a4]
push eax
call fcn.0040f000
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4222d0
push edi
call fcn.0040b930
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.0040ffd0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0040ffe0
lea eax, [ebp - 0xa0]
push 0x4222b0
push eax
call fcn.0040ffe0
push dword [esi + 0x427c5c]
lea eax, [ebp - 0xa0]
push eax
call fcn.0040ffe0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00411075
add esp, 0x2c
pop edi
jmp 0x40ef55
lea eax, [ebp + 8]
lea esi, [esi + 0x427c5c]
push 0
push eax
push dword [esi]
call fcn.0040f000
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret