joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10001b50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xe0
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [esp], eax
call sym.___wine_dbg_get_channel_flags
movzx eax, al
bt eax, esi
jae 0x10001d28
mov edi, dword [0x10006084]
xor eax, eax
mov edx, dword fs:[0x18]
cmp dword [edx + 0x24], edi
je 0x10001c37
test byte [0x10002030], 8
jne 0x10001cd0
lea ebx, [ebp - 0xd4]
mov edi, ebx
test byte [0x10002040], 8
jne 0x10001c90
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
mov dword [esp + 4], str._04x:
mov dword [esp], edi
mov dword [esp + 8], eax
call sym._sprintf
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x10001bd9
cmp esi, 3
jbe 0x10001c48
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov ecx, ebx
mov edi, eax
mov esi, dword [ecx]
add ecx, 4
lea edx, [esi - 0x1010101]
not esi
and edx, esi
and edx, 0x80808080
je 0x10001bea
mov esi, edx
mov dword [esp + 0xc], edi
shr esi, 0x10
test edx, 0x8080
mov dword [esp + 4], 1
cmove edx, esi
lea esi, [ecx + 2]
mov dword [esp], ebx
cmove ecx, esi
mov eax, edx
add al, dl
sbb ecx, 3
sub ecx, ebx
mov dword [esp + 8], ecx
call dword [sym.imp.ucrtbase.dll_fwrite]
add esp, 0xe0
pop ebx
pop esi
pop edi
pop ebp
ret
add eax, edi
mov edi, dword [ebp + 0x10]
mov dword [esp + 8], str._s:_s:_s
mov dword [esp], eax
mov dword [esp + 0x14], edi
mov edi, dword [ebp + 0xc]
lea edx, [edi + 1]
mov dword [esp + 0x10], edx
mov edx, dword [esi*4 + 0x10004148]
mov dword [esp + 0xc], edx
mov edx, ebx
sub edx, eax
add edx, 0xc8
mov dword [esp + 4], edx
call sym._snprintf.constprop.0
jmp 0x10001bd9
mov dword [esp], 0x10002040
call sym.___wine_dbg_get_channel_flags
test al, 8
je 0x10001bb0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x20]
mov dword [esp], edi
mov dword [esp + 4], str._04x:
mov dword [esp + 8], eax
call sym._sprintf
add edi, eax
jmp 0x10001bb0
mov dword [esp], 0x10002030
call sym.___wine_dbg_get_channel_flags
test al, 8
je 0x10001b9b
call dword [sym.imp.kernel32.dll_GetTickCount]
mov edx, 0x10624dd3
lea ebx, [ebp - 0xd4]
mov dword [esp + 4], str._3u._03u:
mov ecx, eax
mul edx
mov dword [esp], ebx
shr edx, 6
imul eax, edx, 0x3e8
mov dword [esp + 8], edx
sub ecx, eax
mov dword [esp + 0xc], ecx
call sym._sprintf
lea edi, [ebx + eax]
jmp 0x10001ba3
mov eax, 0xffffffff
jmp 0x10001c37
Function at 0x40140a
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x415138]
push ebx
push esi
push dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov bl, 1
call fcn.00407bbe
mov esi, eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x18], 0x10
pop ecx
jb 0x401435
mov eax, dword [eax + 4]
jmp 0x401438
add eax, 4
push esi
push dword [ebp + 0xc]
push 0
push eax
call sub.VERSION.dll_GetFileVersionInfoA
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x44]
push eax
push str.VarFileInfoTranslation
push esi
call sub.VERSION.dll_VerQueryValueA
mov eax, dword [ebp - 0x44]
movzx ecx, word [eax + 2]
movzx eax, word [eax]
push ecx
push eax
lea eax, [ebp - 0x38]
push str.StringFileInfo_04x_04xCompanyName
push eax
call fcn.00408d08
add esp, 0x10
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x38]
push eax
push esi
call sub.VERSION.dll_VerQueryValueA
push str.callinghome.biz
push dword [ebp - 0x40]
call fcn.00408c80
test eax, eax
pop ecx
pop ecx
je 0x40149b
xor bl, bl
push esi
call fcn.00408065
pop ecx
mov ecx, dword [ebp - 4]
pop esi
mov al, bl
pop ebx
call fcn.00407ea0
leave
ret
Function at 0x40268e
Capabilities:
Set registry value

Disassembly:
push esi
push dword [esp + 0xc]
mov esi, ecx
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
inc eax
push eax
push dword [esp + 0x10]
push dword [esp + 0x18]
push 0
push dword [esp + 0x18]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
pop esi
ret 0xc
Function at 0x4036a2
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x100]
sub esp, 0x180
mov eax, dword [0x415138]
push ebx
push esi
push 0x64
pop ebx
lea ecx, [ebp - 0x80]
push ecx
lea ecx, [ebp - 0x70]
push ecx
lea ecx, [ebp - 0x7c]
push ecx
mov dword [ebp + 0xfc], eax
xor eax, eax
push eax
lea ecx, [ebp - 0x78]
push ecx
lea ecx, [ebp + 0x98]
mov dword [ebp - 0x7c], eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
push ecx
mov byte [ebp + 0x94], al
mov dword [ebp - 0x74], eax
push eax
jmp 0x403738
cmp dword [ebp - 0x7c], 1
jne 0x403719
mov eax, dword [ebp + 0x110]
mov ecx, dword [eax]
test ecx, ecx
je 0x403708
call fcn.004010b7
jmp 0x40370a
xor eax, eax
push eax
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpiA]
test eax, eax
je 0x403773
inc dword [ebp - 0x74]
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x7c]
push eax
push 0
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp + 0x98]
push eax
push dword [ebp - 0x74]
push dword [ebp + 0x10c]
mov dword [ebp - 0x80], 0x105
mov dword [ebp - 0x78], ebx
call esi
test eax, eax
je 0x4036ef
cmp eax, 0x103
jne 0x40378d
mov eax, dword [ebp + 0x108]
and dword [eax], 0
mov ecx, dword [ebp + 0xfc]
pop esi
pop ebx
call fcn.00407ea0
add ebp, 0x100
leave
ret
mov ecx, dword [ebp + 0x108]
lea eax, [ebp + 0x98]
push eax
call fcn.0040124a
mov eax, dword [ebp + 0x108]
jmp 0x40375e
push eax
push 0x74
call fcn.00405f11
int3
Function at 0x4047f6
Capabilities:
Delete registry value

Disassembly:
mov eax, 0x410571
call fcn.00408c5c
sub esp, 0xc
and dword [ebp - 0x10], 0
push esi
push edi
mov esi, dword [ebp + 0xc]
and dword [ebp - 4], 0
push 0x2001f
push esi
push dword [ebp + 8]
lea ecx, [ebp - 0x10]
call fcn.00402659
mov edi, eax
test edi, edi
je 0x40484f
push 0x20019
push esi
push dword [ebp + 8]
lea ecx, [ebp - 0x10]
call fcn.00402659
test eax, eax
je 0x40484f
push 1
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x14], esp
push esi
call fcn.0040124a
push 0x71
jmp 0x40488f
push dword [ebp + 0x10]
lea eax, [ebp - 0x14]
push dword [ebp - 0x10]
push eax
call fcn.004036a2
add esp, 0xc
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.004012f2
test eax, eax
jne 0x40487a
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x4048c7
jmp 0x4048c2
test edi, edi
je 0x404894
push 1
push edi
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push esi
call fcn.0040124a
push 0x73
call fcn.00405f34
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x4048a4
mov ecx, esi
call fcn.004010b7
jmp 0x4048a6
xor eax, eax
push eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
je 0x4048bc
push eax
push 0x75
call fcn.00405f11
test esi, esi
je 0x4048c7
mov ecx, esi
call fcn.004013dd
lea ecx, [ebp - 0x10]
call fcn.004025f4
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
pop esi
leave
ret

Function at 0x4048dd
Capabilities:
Persist via run registry key

Disassembly:
mov eax, 0x410586
call fcn.00408c5c
sub esp, 0x214
mov eax, dword [0x415138]
push ebx
push esi
mov dword [ebp - 0x14], eax
push edi
lea eax, [ebp - 0x220]
mov dword [ebp - 0x10], esp
push eax
call fcn.00406597
and dword [ebp - 4], 0
lea eax, [ebp - 0x220]
push eax
push 0x411440
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [ebp - 4], 1
call fcn.004047f6
add esp, 0x10
and dword [ebp - 4], 0
lea eax, [ebp - 0x220]
push eax
push 0x411440
push SysReAllocString
mov byte [ebp - 4], 3
call fcn.004047f6
add esp, 0xc
mov ecx, dword [ebp - 0x220]
and dword [ebp - 4], 0
test ecx, ecx
je 0x40496a
call fcn.004010b7
jmp 0x40496c
xor eax, eax
push 0x208
lea ecx, [ebp - 0x21c]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_GetShortPathNameA]
push str.wininit.ini
lea eax, [ebp - 0x21c]
push eax
push 0x411388
push str.Rename
call dword [sym.imp.KERNEL32.DLL_WritePrivateProfileStringA]
push str.kernel32.dll
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
test eax, eax
je 0x4049d6
push str.MoveFileExA
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov esi, eax
test esi, esi
je 0x4049d6
mov ecx, dword [ebp - 0x220]
test ecx, ecx
je 0x4049cd
call fcn.004010b7
jmp 0x4049cf
xor eax, eax
push 4
push 0
push eax
call esi
mov ecx, dword [ebp - 0x220]
test ecx, ecx
je 0x4049e5
call fcn.004013dd
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
call fcn.00407ea0
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405fa5
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
push 0x1e
mov byte [eax + esi + 1], 0
lea eax, [ebp - 0x20]
push 0
push eax
call fcn.00407eb0
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x1c], 3
mov word [ebp - 0x10], 0x414
mov dword [ebp - 0x18], esi
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
neg eax
sbb eax, eax
inc eax
pop esi
leave
ret

Function at 0x4063ac
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [0x415138]
and dword [ebp - 0x110], 0
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
cmp eax, 0x104
jle 0x4063fb
push 1
push 0
push ecx
mov ecx, esp
mov dword [ebp - 0x110], esp
push 0x411ad0
call fcn.0040129e
push 3
call fcn.00405f34
test eax, eax
jne 0x40640d
push 1
push 0x411ad0
push 3
call fcn.00405f81
lea eax, [ebp + eax - 0x10c]
cmp byte [eax - 1], 0x5c
je 0x406426
push 0x411acc
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
push dword [ebp + 0xc]
lea eax, [ebp - 0x10c]
push eax
push dword [ebp + 8]
call fcn.004061d5
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 8]
add esp, 0xc
call fcn.00407ea0
leave
ret

Function at 0x406448
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [0x415138]
and dword [ebp - 0x110], 0
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryA]
cmp eax, 0x104
jle 0x406497
push 1
push 0
push ecx
mov ecx, esp
mov dword [ebp - 0x110], esp
push str.GetWindowsDirectory
call fcn.0040129e
push 3
call fcn.00405f34
test eax, eax
jne 0x4064a9
push 1
push str.GetWindowsDirectory
push 3
call fcn.00405f81
lea eax, [ebp + eax - 0x10c]
cmp byte [eax - 1], 0x5c
je 0x4064c2
push 0x411acc
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
push dword [ebp + 0xc]
lea eax, [ebp - 0x10c]
push eax
push dword [ebp + 8]
call fcn.004061d5
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 8]
add esp, 0xc
call fcn.00407ea0
leave
ret
Function at 0x4065fe
Capabilities:
Create process on windows

Disassembly:
mov eax, 0x41089c
call fcn.00408c5c
sub esp, 0x64
push ebx
push esi
push edi
mov esi, 0x411b98
push esi
lea ecx, [ebp - 0x14]
call fcn.0040124a
push dword [ebp + 8]
lea eax, [ebp - 0x10]
push esi
xor edi, edi
push eax
mov dword [ebp - 4], edi
call fcn.004061d5
add esp, 0xc
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x18]
push ecx
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.004017b2
mov ecx, dword [ebp - 0x10]
cmp ecx, edi
je 0x406653
call fcn.004013dd
mov dword [ebp - 0x10], edi
mov ecx, dword [ebp - 0x14]
cmp ecx, edi
mov byte [ebp - 4], 3
je 0x406663
call fcn.004013dd
push 0x10
lea eax, [ebp - 0x2c]
push edi
push eax
call fcn.00407eb0
push 0x44
pop esi
push esi
lea eax, [ebp - 0x70]
push edi
push eax
call fcn.00407eb0
mov ecx, dword [ebp + 0xc]
add esp, 0x18
call fcn.004012f2
test eax, eax
jbe 0x4066bd
push dword [ebp + 0xc]
lea eax, [ebp - 0x1c]
push 0x411814
push eax
call fcn.00401802
add esp, 0xc
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call fcn.00401750
mov ecx, dword [ebp - 0x1c]
cmp ecx, edi
mov byte [ebp - 4], 3
je 0x4066bd
call fcn.004013dd
mov ebx, dword [ebp - 0x18]
cmp ebx, edi
mov dword [ebp - 0x70], esi
je 0x4066d2
mov ecx, ebx
call fcn.004010b7
mov esi, eax
jmp 0x4066d4
xor esi, esi
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
cmp ecx, edi
je 0x4066e4
call fcn.004010b7
jmp 0x4066e6
xor eax, eax
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x70]
push ecx
push edi
push edi
push edi
push edi
push edi
push edi
push esi
push eax
call dword [sym.imp.KERNEL32.DLL_CreateProcessA]
test eax, eax
jne 0x40670e
push 1
push str.CreateProcess
push 3
call fcn.00405f81
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp ebx, edi
mov esi, dword [ebp - 0x2c]
je 0x406725
mov ecx, ebx
call fcn.004013dd
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x406fd6
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x415138]
push ebx
push esi
push edi
mov esi, 0xfa00
push esi
mov dword [ebp - 4], eax
call fcn.00407bbe
push esi
mov ebx, eax
call fcn.00407bbe
and dword [ebp - 0x18], 0
mov esi, str.sh_k
lea edi, [ebp - 0x14]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
xor eax, eax
lea edi, [ebp - 0xf]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
pop ecx
stosb byte es:[edi], al
cmp byte [ebp - 0x14], 0
pop ecx
mov dword [ebp - 0x24], ebx
je 0x40702f
lea eax, [ebp - 0x14]
add byte [eax], 7
inc eax
cmp byte [eax], 0
jne 0x407026
mov esi, dword [sym.imp.KERNEL32.DLL_lstrcpyA]
lea eax, [ebp - 0x14]
push eax
push ebx
call esi
push dword [ebp + 8]
mov edi, dword [ebp - 0x1c]
push edi
call esi
mov al, byte [ebx]
push 4
xor edx, edx
pop ecx
movsx eax, al
or edx, eax
inc ebx
mov al, byte [ebx]
test al, al
je 0x40705b
shl edx, 8
dec ecx
jne 0x40704c
or edx, 0x80808080
jmp 0x4070bd
xor esi, esi
xor ecx, ecx
xor eax, eax
mov al, byte [edi]
inc ecx
test al, al
je 0x407087
and eax, 0xff
or dword [ebp - 0x18], eax
inc edi
cmp ecx, 4
jae 0x40708d
shl dword [ebp - 0x18], 8
jmp 0x40706a
shr dword [ebp - 0x18], 8
jmp 0x40708e
inc ecx
xor dword [ebp - 0x18], edx
lea eax, [ecx - 1]
test eax, eax
jle 0x4070bd
lea ecx, [ebp - 0x1c]
dec ecx
mov bl, byte [ebp - 0x18]
shr dword [ebp - 0x18], 8
inc esi
cmp esi, eax
mov byte [ecx + esi], bl
jl 0x40709c
lea ecx, [ebp + eax - 0x1c]
mov esi, dword [ebp + 8]
dec ecx
mov bl, byte [ecx]
inc dword [ebp + 8]
dec eax
mov byte [esi], bl
jne 0x4070af
cmp byte [edi], 0
jne 0x407066
push dword [ebp - 0x20]
call fcn.004087b5
push dword [ebp - 0x24]
call fcn.004087b5
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.00407ea0
leave
ret
Function at 0x407448
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp byte [esi + 0x128], bl
jne 0x40751a
push ebx
push 0x80
push 3
push ebx
push 1
push ebx
push esi
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x40747e
mov dword [ebp - 4], ebx
cmp dword [ebp - 4], ebx
je 0x4074a8
push 0x34
lea eax, [ebp - 0x40]
push ebx
push eax
call fcn.00407eb0
add esp, 0xc
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_GetFileInformationByHandle]
test eax, eax
je 0x407505
mov eax, dword [ebp - 0x24]
jmp 0x4074ff
mov al, byte [esi]
xor ecx, ecx
cmp al, bl
je 0x4074cd
push edi
lea edi, [ebp - 8]
mov edx, esi
sub edi, esi
cmp al, 0x3a
je 0x4074cc
cmp ecx, 2
jge 0x4074cc
mov byte [edi + edx], al
inc ecx
inc edx
mov al, byte [edx]
cmp al, bl
jne 0x4074b8
pop edi
cmp byte [ecx + esi], 0x3a
jne 0x407513
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
lea eax, [ebp - 8]
push eax
mov dword [ebp - 0xc], ebx
mov byte [ebp + ecx - 8], 0x3a
mov byte [ebp + ecx - 7], 0x5c
mov byte [ebp + ecx - 6], bl
call dword [sym.imp.KERNEL32.DLL_GetVolumeInformationA]
test eax, eax
je 0x407513
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x124], eax
cmp dword [ebp - 4], ebx
je 0x407513
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov byte [esi + 0x128], 1
mov eax, dword [esi + 0x124]
pop esi
pop ebx
leave
ret

Function at 0x4075c1
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 0x10]
mov eax, dword [esi]
and dword [esi], 0
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push edi
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 8]
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x407612
cmp dword [ebp + 0x10], 1
je 0x4075fb
cmp dword [ebp + 0x10], 2
jne 0x407609
test edi, edi
mov eax, dword [ebp - 4]
je 0x40760e
cmp byte [eax + edi - 1], 0
je 0x40760e
push 0xd
pop eax
jmp 0x407612
mov dword [esi], eax
xor eax, eax
pop edi
pop esi
leave
ret 0xc
Function at 0x409179
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x411d68
call fcn.00407f10
mov edi, 0x94
mov eax, edi
call fcn.004090c0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x415c14], ecx
mov eax, dword [esi + 4]
mov dword [0x415c20], eax
mov edx, dword [esi + 8]
mov dword [0x415c24], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x415c18], esi
cmp ecx, 2
je 0x4091d9
or esi, 0x8000
mov dword [0x415c18], esi
shl eax, 8
add eax, edx
mov dword [0x415c1c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x409214
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x409214
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40922c
cmp eax, 0x20b
je 0x409219
mov dword [ebp - 0x1c], esi
jmp 0x409240
cmp dword [ecx + 0x84], 0xe
jbe 0x409214
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40923a
cmp dword [ecx + 0x74], 0xe
jbe 0x409214
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00409be4
pop ecx
test eax, eax
jne 0x40926c
cmp dword [0x415b70], 1
jne 0x409259
call fcn.0040ce05
push 0x1c
call fcn.0040cc8e
push 0xff
call fcn.0040c017
pop ecx
pop ecx
call fcn.0040d5ae
mov dword [ebp - 4], esi
call fcn.0040d403
test eax, eax
jge 0x409285
push 0x1b
call fcn.00409154
pop ecx
call dword [sym.imp.KERNEL32.DLL_GetCommandLineA]
mov dword [0x417194], eax
call fcn.0040d2e1
mov dword [0x415b68], eax
call fcn.0040d23f
test eax, eax
jge 0x4092ab
push 8
call fcn.00409154
pop ecx
call fcn.0040d00c
test eax, eax
jge 0x4092bc
push 9
call fcn.00409154
pop ecx
push 1
call fcn.0040c047
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4092d2
push eax
call fcn.00409154
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.DLL_GetStartupInfoA]
call fcn.0040cfaf
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4092f3
movzx eax, word [ebp - 0x40]
jmp 0x4092f6
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401e7a
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x409314
push edi
call fcn.0040c172
call fcn.0040c194
jmp 0x409346
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00407f4b
ret
Function at 0x4099a1
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x4099cf
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x4099d6
cmp ebx, dword [eax + 4]
jae 0x4099d6
xor eax, eax
jmp 0x409bc6
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4099e7
xor eax, eax
inc eax
jmp 0x409bc5
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4099fd
cmp ecx, edx
jae 0x409b42
cmp dword [eax + 4], 0
je 0x409a06
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4099ee
cmp dword [ebp + 8], 0
je 0x409a28
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x409b42
cmp eax, esi
jae 0x409b42
mov eax, dword [0x415b80]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x409a4d
cmp dword [esi*4 + 0x415b88], edi
je 0x409b46
inc esi
cmp esi, eax
jl 0x409a3b
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x409bc2
cmp dword [ebp - 8], 0x1000000
jne 0x409bc2
test byte [ebp - 0xc], 0xcc
je 0x409acb
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x409bc2
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x409bc2
cmp word [eax + 0x18], 0x10b
jne 0x409bc2
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x409bc2
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x409acb
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x409acb
test byte [ecx + 0x27], 0x80
jne 0x409b42
push 1
push 0x415bc8
call dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
test eax, eax
jne 0x4099df
mov ecx, dword [0x415b80]
test ecx, ecx
mov edx, ecx
jle 0x409aff
lea eax, [ecx*4 + 0x415b84]
cmp dword [eax], edi
je 0x409aff
dec edx
sub eax, 4
test edx, edx
jg 0x409af3
test edx, edx
jne 0x409b30
push 0xf
pop ebx
cmp ecx, ebx
jg 0x409b0c
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x409b24
lea eax, [edx*4 + 0x415b88]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x409b12
cmp ecx, 0x10
jge 0x409b30
inc ecx
mov dword [0x415b80], ecx
push 0
push 0x415bc8
call dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
jmp 0x4099df
xor eax, eax
jmp 0x409bc5
test esi, esi
jle 0x4099df
mov ebx, dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
push 1
push 0x415bc8
call ebx
test eax, eax
jne 0x4099df
cmp dword [esi*4 + 0x415b88], edi
je 0x409b9c
mov eax, dword [0x415b80]
lea esi, [eax - 1]
test esi, esi
jl 0x409b8a
cmp dword [esi*4 + 0x415b88], edi
je 0x409b86
dec esi
jns 0x409b7a
test esi, esi
jge 0x409b9a
cmp eax, 0x10
jge 0x409b95
inc eax
mov dword [0x415b80], eax
lea esi, [eax - 1]
jmp 0x409b9c
je 0x409bb4
xor ecx, ecx
test esi, esi
jl 0x409bb4
lea eax, [ecx*4 + 0x415b88]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x409ba2
push 0
push 0x415bc8
call ebx
jmp 0x4099df
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret