joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40c530
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
mov eax, dword [esi]
mov ebx, dword [eax - 4]
mov edx, dword [eax - 8]
sub eax, 0x10
mov ebp, ecx
mov ecx, 1
sub ecx, ebx
mov ebx, 0x400
sub edx, ebx
or ecx, edx
push edi
jge 0x40c55f
push ebx
mov ecx, esi
call fcn.00403730
mov edi, dword [esi]
cmp dword [edi - 8], ebx
jge 0x40c570
push 0x80070057
call fcn.004033d0
mov eax, dword [esi]
mov dword [eax - 0xc], ebx
mov ecx, dword [esi]
push edi
push ebx
mov byte [ecx + 0x400], 0
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x40c5d5
mov edx, dword [esi]
test edx, edx
jne 0x40c594
xor edi, edi
jmp 0x40c5ad
mov eax, edx
lea edi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c5a0
sub eax, edi
mov edi, eax
js 0x40c5b2
cmp edi, dword [edx - 8]
jle 0x40c5bc
push 0x80070057
call fcn.004033d0
mov edx, dword [esi]
mov dword [edx - 0xc], edi
mov eax, dword [esi]
push 7
push str.C:Temp
mov ecx, esi
mov byte [edi + eax], 0
call fcn.00403f20
mov edx, dword [esi]
test edx, edx
jne 0x40c5df
xor edi, edi
jmp 0x40c5f1
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c5e4
sub eax, edi
mov edi, eax
js 0x40c5f6
cmp edi, dword [edx - 8]
jle 0x40c600
push 0x80070057
call fcn.004033d0
mov ecx, dword [esi]
mov dword [ecx - 0xc], edi
mov edx, dword [esi]
mov byte [edi + edx], 0
mov eax, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push eax
call edi
cmp eax, 0xffffffff
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
je 0x40c625
test al, 0x10
jne 0x40c63b
mov edx, dword [esi]
call fcn.0040b280
mov eax, dword [esi]
push 0
push eax
call ebx
test eax, eax
je 0x40c6bd
push 0x41f424
mov ecx, esi
call fcn.0040bee0
push 1
push 0x41f424
mov ecx, esi
call fcn.00403e90
mov eax, dword [ebp + 0xa4]
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov ecx, esi
call fcn.00403e90
push 3
push 0x41fa50
mov ecx, esi
call fcn.00403e90
mov eax, dword [esi]
push eax
call edi
cmp eax, 0xffffffff
je 0x40c6a1
mov edx, dword [esi]
push edx
call fcn.0040b0e0
mov eax, dword [esi]
add esp, 4
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [esi]
call fcn.0040b280
mov edx, dword [esi]
push 0
push edx
call ebx
mov esi, dword [esi]
push esi
call edi
cmp eax, 0xffffffff
je 0x40c6bd
test al, 0x10
jne 0x40c6c6
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret 4
Function at 0x40cc30
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry value

Disassembly:
sub esp, 0x10
mov eax, dword [0x4259c0]
push ebp
push esi
push edi
mov ecx, 0x4259c0
xor ebp, ebp
call dword [eax + 0xc]
mov edi, eax
add edi, 0x10
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall_
lea ecx, [esp + 0x14]
mov dword [esp + 0x10], edi
call fcn.004048b0
mov edx, dword [esp + 0x20]
test edx, edx
jne 0x40cc68
xor eax, eax
jmp 0x40cc79
mov eax, edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cc70
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x18]
call fcn.00403e90
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x20]
push ecx
push 0x2001f
push 0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x34], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40cdd8
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x14]
push edx
push 0
lea ecx, [esp + 0x20]
push ecx
push 0
push str.InstallLocation
mov ebp, eax
push eax
mov dword [esp + 0x38], ebp
mov dword [esp + 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40cdd8
mov eax, dword [esp + 0x18]
cmp eax, 1
je 0x40ccf6
cmp eax, 2
jne 0x40cdd8
mov eax, dword [esp + 0x14]
test eax, eax
mov dword [esp + 0x14], eax
jbe 0x40cdd8
lea edx, [esp + 0x14]
push edx
dec eax
push eax
lea ecx, [esp + 0x14]
call fcn.0040ba80
push eax
push str.InstallLocation
lea ecx, [esp + 0x2c]
call fcn.0040aa00
test eax, eax
jne 0x40cdd4
mov eax, dword [esp + 0xc]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jne 0x40cd5e
lea ecx, [esp + 0x10]
call fcn.00403ae0
lea ecx, [esp + 0xc]
call fcn.00403ae0
lea ecx, [esp + 0x20]
call int.0040b6f0
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x10
ret 8
mov ecx, dword [esp + 0x14]
add ecx, 0xfffffffe
push ecx
lea ecx, [esp + 0x10]
call fcn.00403a80
cmp al, 0x5c
lea ecx, [esp + 0xc]
push 0x41f424
je 0x40cd88
call fcn.00404730
mov edx, dword [esp + 0x24]
push edx
jmp 0x40cd92
call fcn.00404730
mov eax, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x10]
call fcn.00404730
mov edi, dword [esp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40cdd8
lea ecx, [esp + 0x10]
call fcn.00403ae0
lea ecx, [esp + 0xc]
call fcn.00403ae0
lea ecx, [esp + 0x20]
call int.0040b6f0
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x10
ret 8
mov edi, dword [esp + 0xc]
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cdf2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ce0c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test ebp, ebp
je 0x40ce17
push ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x10
ret 8
Function at 0x40d1a0
Capabilities:
Write file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebp
push esi
push edi
mov esi, ecx
push eax
lea ecx, [esp + 0x18]
call fcn.004048b0
mov ebp, dword [esp + 0x14]
push 0
push 0
push 2
push 0
push 3
push 0xc0000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40d221
mov eax, dword [esi + 0xa0]
add esi, 0xa0
mov dword [esp + 0xc], 0
mov ecx, dword [eax - 4]
push ebx
mov ebx, dword [eax - 0xc]
sub eax, 0x10
cmp ecx, 1
jle 0x40d203
mov ecx, dword [eax + 4]
push ecx
mov ecx, esi
call fcn.00403590
mov esi, dword [esi]
push 0
lea edx, [esp + 0x14]
push edx
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
pop ebx
push edi
jne 0x40d244
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d23b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop edi
pop esi
xor eax, eax
pop ebp
pop ecx
ret 4
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d264
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop edi
pop esi
mov eax, 1
pop ebp
pop ecx
ret 4
Function at 0x40e610
Capabilities:
Delete registry value
Persist via run registry key
Query or enumerate registry value

Disassembly:
sub esp, 8
push edi
mov edi, ecx
mov eax, dword [edi + 0x74]
test eax, eax
jne 0x40e62a
call fcn.0040d890
test eax, eax
je 0x40e6b5
push esi
lea eax, [esp + 8]
push eax
push 0x2001f
xor esi, esi
push esi
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x1c], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40e696
mov esi, dword [esp + 8]
lea ecx, [esp + 8]
push ecx
push eax
lea edx, [esp + 0x14]
push edx
push eax
push str.RavDown
push esi
mov dword [esp + 0x20], eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40e696
mov eax, dword [esp + 0xc]
cmp eax, 1
je 0x40e682
cmp eax, 2
jne 0x40e696
mov eax, dword [esp + 8]
test eax, eax
jbe 0x40e696
push str.RavDown
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov eax, dword [edi + 0x84]
push 0
push 1
push eax
call fcn.0040f6f0
add esp, 0xc
test esi, esi
je 0x40e6b4
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov eax, dword [edi + 0x68]
test eax, eax
pop edi
je 0x40e6cd
push 0
push 6
push 0x7e8
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
add esp, 8
ret

Function at 0x40e960
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x10
test ebx, ebx
push ebp
mov ebp, dword [esp + 0x18]
je 0x40ea9c
test esi, esi
je 0x40ea9c
xor eax, eax
lea ebx, [ebx]
mov byte [eax + esi], al
inc eax
cmp eax, 0x100
jl 0x40e980
mov edx, 1
sub edx, esi
mov dword [esp + 8], edx
mov edx, 2
sub edx, esi
mov dword [esp + 0xc], edx
push edi
xor eax, eax
mov edx, 3
xor edi, edi
sub edx, esi
mov dword [esp + 8], eax
mov ecx, esi
mov dword [esp + 0x14], edx
cdq
idiv ebp
movzx eax, byte [edx + ebx]
movzx edx, byte [ecx]
add eax, edi
add edx, eax
mov edi, edx
and edi, 0x800000ff
jns 0x40e9d7
dec edi
or edi, 0xffffff00
inc edi
mov dl, byte [edi + esi]
mov al, byte [ecx]
mov byte [ecx], dl
mov byte [edi + esi], al
mov eax, dword [esp + 0xc]
add eax, ecx
cdq
idiv ebp
movzx eax, byte [ecx + 1]
movzx edx, byte [edx + ebx]
add edx, edi
add eax, edx
mov edi, eax
and edi, 0x800000ff
jns 0x40ea08
dec edi
or edi, 0xffffff00
inc edi
mov dl, byte [edi + esi]
mov al, byte [ecx + 1]
mov byte [ecx + 1], dl
mov byte [edi + esi], al
mov eax, dword [esp + 0x10]
add eax, ecx
cdq
idiv ebp
movzx eax, byte [ecx + 2]
movzx edx, byte [edx + ebx]
add edx, edi
add eax, edx
mov edi, eax
and edi, 0x800000ff
jns 0x40ea3b
dec edi
or edi, 0xffffff00
inc edi
mov dl, byte [edi + esi]
mov al, byte [ecx + 2]
mov byte [ecx + 2], dl
mov byte [edi + esi], al
mov eax, dword [esp + 0x14]
add eax, ecx
cdq
idiv ebp
movzx eax, byte [ecx + 3]
movzx edx, byte [edx + ebx]
add edx, edi
add eax, edx
mov edi, eax
and edi, 0x800000ff
jns 0x40ea6e
dec edi
or edi, 0xffffff00
inc edi
mov al, byte [ecx + 3]
mov dl, byte [edi + esi]
mov byte [ecx + 3], dl
mov byte [edi + esi], al
mov eax, dword [esp + 8]
add eax, 4
add ecx, 4
cmp eax, 0x100
mov dword [esp + 8], eax
jl 0x40e9b7
pop edi
or eax, 0xffffffff
pop ebp
add esp, 0x10
ret
xor eax, eax
pop ebp
add esp, 0x10
ret
Function at 0x40fb20
Capabilities:
Check if file exists
Copy file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x114
mov eax, dword [0x42482c]
xor eax, ebp
push ebx
mov ebx, dword [ebp + 8]
mov dword [esp + 0x114], eax
push esi
mov esi, dword [ebp + 0xc]
push edi
xor eax, eax
mov byte [esp + 0x10], 0
mov ecx, 0x40
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, esi
mov dword [esp + 0xc], ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40fb61
sub eax, edx
cmp eax, 0x103
jbe 0x40fb78
push 0x6f
jmp 0x40fc40
push 0x103
lea eax, [esp + 0x14]
push esi
push eax
call fcn.0041549d
lea ecx, [esp + 0x1c]
push 0x5c
push ecx
call fcn.00414e94
add esp, 0x14
test eax, eax
je 0x40fc3e
lea edx, [esp + 0x10]
push edx
mov byte [eax], 0
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 3
jge 0x40fbc2
push 0x41f424
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push ebx
call edi
test eax, eax
jne 0x40fbd3
push 2
jmp 0x40fc40
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40fbf1
lea ecx, [esp + 0x10]
push 0
push ecx
call fcn.0040f990
add esp, 8
test eax, eax
jne 0x40fbf1
push 0x52
jmp 0x40fc40
push esi
call edi
test eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
je 0x40fc06
push 0x80
push esi
call ebx
mov edx, dword [ebp + 0x10]
mov eax, dword [esp + 0xc]
push edx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov edi, eax
test edi, edi
je 0x40fc27
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x40fc27
push eax
push esi
call ebx
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
xor ecx, ebp
call fcn.004145af
mov esp, ebp
pop ebp
ret
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x11c]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004145af
mov esp, ebp
pop ebp
ret

Function at 0x40fc60
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x3c
mov edx, dword [esp + 0x48]
push edi
xor eax, eax
mov ecx, 0xf
lea edi, [esp + 4]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x48]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x54]
lea edx, [esp + 4]
push edx
mov dword [esp + 8], 0x3c
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], 1
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
pop edi
add esp, 0x3c
ret

Function at 0x40fcc0
Capabilities:
Check os version

Disassembly:
sub esp, 0x98
mov eax, dword [0x42482c]
xor eax, esp
mov dword [esp + 0x94], eax
lea eax, [esp]
push eax
mov dword [esp + 4], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x40fd12
cmp dword [esp + 0x10], 2
jne 0x40fd12
cmp dword [esp + 4], 6
jb 0x40fd12
mov eax, 1
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.004145af
add esp, 0x98
ret
mov ecx, dword [esp + 0x94]
xor ecx, esp
xor eax, eax
call fcn.004145af
add esp, 0x98
ret
Function at 0x4102a0
Capabilities:
Get file size

Disassembly:
mov al, byte [ecx + 0x38]
test al, al
je 0x4102ef
cmp dword [ecx + 0x34], 0x10
jb 0x4102b2
mov ecx, dword [ecx + 0x20]
jmp 0x4102b5
add ecx, 0x20
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push edi
add esi, 0x1800
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
ret
mov eax, dword [ecx + 0x3c]
test eax, eax
je 0x410303
mov ecx, dword [ecx + 0x40]
test ecx, ecx
lea eax, [ecx + 0x1800]
jne 0x410308
mov eax, 0x2000
ret
Function at 0x415141
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00414f90
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4151dc
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x425bc4]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x4151dc
cmp eax, 1
je 0x4151fd
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4151dc
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x4151a9
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4151d8
xor eax, eax
inc eax
jmp 0x41521c
cmp edi, eax
jae 0x4151e0
xor eax, eax
jmp 0x41521c
cmp eax, esi
jae 0x4151e7
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x425bc4]
jmp 0x415200
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x415372
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
test edi, edi
jne 0x41538f
call fcn.00418541
mov dword [eax], 0x16
xor eax, eax
jmp 0x4153f9
push esi
push 0x8c
push 1
call fcn.0041b013
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x4153e4
push esi
call fcn.004172d4
mov eax, dword [ebp + 0x14]
or dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
pop ecx
mov dword [esi + 0x4c], edi
jne 0x4153c2
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x4152dd
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x4153f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.00413ba1
test ebx, ebx
pop ecx
je 0x4153f6
push ebx
call fcn.00418553
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x415606
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x420178
call fcn.00415840
mov edi, 0x94
mov eax, edi
call fcn.00414f90
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 [0x425bc4], ecx
mov eax, dword [esi + 4]
mov dword [0x425bd0], eax
mov edx, dword [esi + 8]
mov dword [0x425bd4], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x425bc8], esi
cmp ecx, 2
je 0x415666
or esi, 0x8000
mov dword [0x425bc8], esi
shl eax, 8
add eax, edx
mov dword [0x425bcc], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4156a1
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4156a1
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4156b9
cmp eax, 0x20b
je 0x4156a6
mov dword [ebp - 0x1c], esi
jmp 0x4156cd
cmp dword [ecx + 0x84], 0xe
jbe 0x4156a1
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4156c7
cmp dword [ecx + 0x74], 0xe
jbe 0x4156a1
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00415acf
pop ecx
test eax, eax
jne 0x4156e1
push 0x1c
call fcn.004155e2
pop ecx
call fcn.004174ce
test eax, eax
jne 0x4156f2
push 0x10
call fcn.004155e2
pop ecx
call fcn.0041b997
mov dword [ebp - 4], esi
call fcn.0041b799
test eax, eax
jge 0x41570b
push 0x1b
call fcn.004155bd
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x427298], eax
call fcn.0041b677
mov dword [0x425a10], eax
call fcn.0041b5d5
test eax, eax
jge 0x415731
push 8
call fcn.004155bd
pop ecx
call fcn.0041b3a2
test eax, eax
jge 0x415742
push 9
call fcn.004155bd
pop ecx
push 1
call fcn.00416821
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x415758
push eax
call fcn.004155bd
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0041b345
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x415779
movzx eax, word [ebp - 0x40]
jmp 0x41577c
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00407ab0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x41579a
push edi
call fcn.0041694e
call fcn.00416970
jmp 0x4157cc
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0041587b
ret
Function at 0x41588c
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 0x4158ba
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 0x4158c1
cmp ebx, dword [eax + 4]
jae 0x4158c1
xor eax, eax
jmp 0x415ab1
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4158d2
xor eax, eax
inc eax
jmp 0x415ab0
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4158e8
cmp ecx, edx
jae 0x415a2d
cmp dword [eax + 4], 0
je 0x4158f1
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4158d9
cmp dword [ebp + 8], 0
je 0x415913
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x415a2d
cmp eax, esi
jae 0x415a2d
mov eax, dword [0x425a20]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x415938
cmp dword [esi*4 + 0x425a28], edi
je 0x415a31
inc esi
cmp esi, eax
jl 0x415926
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x415aad
cmp dword [ebp - 8], 0x1000000
jne 0x415aad
test byte [ebp - 0xc], 0xcc
je 0x4159b6
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x415aad
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x415aad
cmp word [eax + 0x18], 0x10b
jne 0x415aad
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x415aad
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4159b6
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4159b6
test byte [ecx + 0x27], 0x80
jne 0x415a2d
push 1
push 0x425a68
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x4158ca
mov ecx, dword [0x425a20]
test ecx, ecx
mov edx, ecx
jle 0x4159ea
lea eax, [ecx*4 + 0x425a24]
cmp dword [eax], edi
je 0x4159ea
dec edx
sub eax, 4
test edx, edx
jg 0x4159de
test edx, edx
jne 0x415a1b
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4159f7
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x415a0f
lea eax, [edx*4 + 0x425a28]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4159fd
cmp ecx, 0x10
jge 0x415a1b
inc ecx
mov dword [0x425a20], ecx
push 0
push 0x425a68
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x4158ca
xor eax, eax
jmp 0x415ab0
test esi, esi
jle 0x4158ca
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x425a68
call ebx
test eax, eax
jne 0x4158ca
cmp dword [esi*4 + 0x425a28], edi
je 0x415a87
mov eax, dword [0x425a20]
lea esi, [eax - 1]
test esi, esi
jl 0x415a75
cmp dword [esi*4 + 0x425a28], edi
je 0x415a71
dec esi
jns 0x415a65
test esi, esi
jge 0x415a85
cmp eax, 0x10
jge 0x415a80
inc eax
mov dword [0x425a20], eax
lea esi, [eax - 1]
jmp 0x415a87
je 0x415a9f
xor ecx, ecx
test esi, esi
jl 0x415a9f
lea eax, [ecx*4 + 0x425a28]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x415a8d
push 0
push 0x425a68
call ebx
jmp 0x4158ca
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret