joyce8/EMBER2024-capa huggingface dataset:
Function at 0x45b139
Capabilities:
Get graphical window text

Disassembly:
push 4
mov eax, 0x489b4c
call fcn.004727c0
mov esi, ecx
cmp dword [esi + 0x50], 0
jne 0x45b15e
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextW]
jmp 0x45b1a4
lea ecx, [ebp - 0x10]
call fcn.00406360
mov ecx, dword [esi + 0x50]
mov eax, dword [ecx]
and dword [ebp - 4], 0
lea edx, [ebp - 0x10]
push edx
call dword [eax + 0x8c]
push 0xffffffffffffffff
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00453e4e
add esp, 0x10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
mov esi, eax
call fcn.004063b0
mov eax, esi
call fcn.00472898
ret 8

Function at 0x45f799
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
cmp dword [ebp + 0xc], ebx
je 0x45f7e1
call fcn.0045cd18
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x45f7e1
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
test eax, eax
je 0x45f824
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov esi, dword [ebp + 8]
mov dword [ebp + 0xc], 1
test ebx, ebx
je 0x45f80d
push dword [ebp + 0x10]
mov eax, dword [edi]
push ebx
push esi
mov ecx, edi
call dword [eax + 0x20]
cmp dword [ebp - 4], 0
mov dword [ebp + 0xc], eax
je 0x45f80d
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [esi + 0x4c], 0
je 0x45f821
mov ecx, dword [esi + 0x4c]
push dword [ebp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0xa0]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x4705a7
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4ad650]
jne 0x4705b1
repz ret
jmp fcn.0047643e
Function at 0x480ea2
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00475da2
and dword [ebp - 4], 0
cmp dword [0x4b1cd8], 0
mov ebx, eax
jne 0x480f53
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x481004
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x481004
push eax
call fcn.00475d30
mov dword [esp], 0x49723c
push edi
mov dword [0x4b1cd8], eax
call esi
push eax
call fcn.00475d30
mov dword [esp], 0x497228
push edi
mov dword [0x4b1cdc], eax
call esi
push eax
call fcn.00475d30
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x4b1ce0], eax
call esi
push eax
call fcn.00475d30
pop ecx
mov dword [0x4b1ce8], eax
test eax, eax
je 0x480f53
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00475d30
pop ecx
mov dword [0x4b1ce4], eax
mov eax, dword [0x4b1ce4]
cmp eax, ebx
je 0x480fab
cmp dword [0x4b1ce8], ebx
je 0x480fab
push eax
call fcn.00475dab
push dword [0x4b1ce8]
mov esi, eax
call fcn.00475dab
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x480fab
test edi, edi
je 0x480fab
call esi
test eax, eax
je 0x480fa2
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x480fa2
test byte [ebp - 0xc], 1
jne 0x480fab
or dword [ebp + 0x10], 0x200000
jmp 0x480fe4
mov eax, dword [0x4b1cdc]
cmp eax, ebx
je 0x480fe4
push eax
call fcn.00475dab
pop ecx
test eax, eax
je 0x480fe4
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x480fe4
mov eax, dword [0x4b1ce0]
cmp eax, ebx
je 0x480fe4
push eax
call fcn.00475dab
pop ecx
test eax, eax
je 0x480fe4
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4b1cd8]
call fcn.00475dab
pop ecx
test eax, eax
je 0x481004
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x481006
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4029d0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 8
push edi
mov edi, dword [esp + 0x14]
push edi
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
call fcn.004029b0
add esp, 4
test al, al
jne 0x4029fa
pop edi
add esp, 8
ret
push ebx
mov ebx, dword [sym.imp.kernel32.dll_WriteFile]
push esi
mov esi, dword [esp + 0x18]
lea eax, [esp + 0xc]
push 0
push eax
push 0x10
push edi
push esi
call ebx
mov ax, word [edi + 2]
test ax, ax
je 0x402a31
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0xc]
push 0
and eax, 0xffff
push ecx
push eax
push edx
push esi
call ebx
mov ax, word [edi + 4]
mov ebx, dword [sym.imp.kernel32.dll_ReadFile]
test ax, ax
je 0x402a55
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x10]
push 0
and eax, 0xffff
push ecx
push eax
push edx
push esi
call ebx
mov edi, dword [esp + 0x24]
lea eax, [esp + 0xc]
push 0
push eax
push 0x10
push edi
push esi
call ebx
push edi
call fcn.004029a0
add esp, 4
mov al, 1
pop esi
pop ebx
pop edi
add esp, 8
ret
Function at 0x404f30
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x417c28
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x20]
test esi, esi
push edi
mov ebx, ecx
jne 0x404f65
push esi
push esi
push esi
push 2
call fcn.004068c0
xor al, al
jmp 0x4050fa
mov ecx, ebx
call fcn.00404480
push 2
or eax, 0xffffffff
push 0
push esi
mov dword [ebx + 8], eax
mov dword [ebx + 4], eax
call fcn.00409bc7
push esi
call fcn.00409ad2
push 0
push 0
push esi
mov edi, eax
call fcn.00409bc7
add esp, 0x1c
test edi, edi
jg 0x404fae
push 0
push 0
push 0
push 0xd
mov ecx, ebx
call fcn.004068c0
xor al, al
jmp 0x4050fa
mov dword [esp + 0x10], 0x41e498
push edi
lea ecx, [esp + 0x14]
mov dword [esp + 0x20], 0
call fcn.00403fa0
lea eax, [edi + 1]
push eax
call fcn.00408787
push esi
mov ebp, eax
push 1
push edi
push ebp
mov byte [ebp], 0
call fcn.0040991f
add esp, 0x14
cmp eax, 1
je 0x405024
push ebp
call fcn.0040825c
add esp, 4
mov ecx, ebx
push 0
push 0
push 0
push 2
call fcn.004068c0
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], 0xffffffff
cmp eax, 0x41e498
je 0x40501d
push eax
call fcn.0040825c
add esp, 4
xor al, al
jmp 0x4050fa
mov byte [edi + ebp], 0
mov cl, byte [ebp]
test cl, cl
mov eax, ebp
mov esi, ebp
je 0x40508f
mov cl, byte [esi]
cmp cl, 0xa
jne 0x40504f
mov ecx, esi
sub ecx, eax
inc ecx
push ecx
push eax
lea ecx, [esp + 0x18]
call fcn.00404130
inc esi
mov eax, esi
jmp 0x40508a
cmp cl, 0xd
jne 0x405089
mov ecx, esi
sub ecx, eax
test ecx, ecx
jle 0x405067
push ecx
push eax
lea ecx, [esp + 0x18]
call fcn.00404130
lea edx, [esp + 0x24]
push 1
push edx
lea ecx, [esp + 0x18]
mov byte [esp + 0x2c], 0xa
call fcn.00404130
cmp byte [esi + 1], 0xa
jne 0x40504a
add esi, 2
mov eax, esi
jmp 0x40508a
inc esi
cmp byte [esi], 0
jne 0x405033
sub esi, eax
je 0x40509e
push esi
push eax
lea ecx, [esp + 0x18]
call fcn.00404130
push ebp
call fcn.0040825c
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x14]
mov eax, dword [ebx]
add esp, 4
add edx, 8
push ecx
push 0
push edx
mov ecx, ebx
call dword [eax + 8]
mov al, byte [ebx + 0x2c]
mov dword [esp + 0x1c], 0xffffffff
test al, al
mov eax, dword [esp + 0x10]
je 0x4050e8
cmp eax, 0x41e498
je 0x40501d
push eax
call fcn.0040825c
add esp, 4
xor al, al
jmp 0x4050fa
cmp eax, 0x41e498
je 0x4050f8
push eax
call fcn.0040825c
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 8
Function at 0x407eb0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x200
push esi
push edi
mov esi, ecx
push eax
call fcn.00407f40
mov edi, eax
push 0
push 0
push edi
call fcn.00409bc7
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x14]
push edi
push ecx
push 1
push edx
call fcn.0040a226
mov eax, dword [esi]
add esp, 0x1c
mov ecx, esi
push 0
push 0
call dword [eax + 0x38]
mov edx, dword [esi]
lea eax, [esp + 8]
push 0x200
push eax
mov ecx, esi
call dword [edx + 0x14]
test eax, eax
je 0x407f29
push edi
push eax
lea ecx, [esp + 0x10]
push 1
push ecx
call fcn.0040a226
mov edx, dword [esi]
add esp, 0x10
lea eax, [esp + 8]
mov ecx, esi
push 0x200
push eax
call dword [edx + 0x14]
test eax, eax
jne 0x407f03
push edi
mov ecx, esi
call fcn.00407f80
pop edi
pop esi
add esp, 0x200
ret 4

Function at 0x407fa0
Capabilities:
Write file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
push edi
test ebx, ebx
mov esi, ecx
je 0x407fec
push 0
push 0
push ebx
call fcn.00409bc7
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 0x10]
add eax, edx
add esp, 0xc
xor edi, edi
mov byte [esp + 0x10], 0
test eax, eax
jle 0x407fec
push ebx
push 1
lea ecx, [esp + 0x18]
push 1
push ecx
call fcn.0040a226
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
add esp, 0x10
inc edi
add edx, ecx
cmp edi, edx
jl 0x407fcd
pop edi
pop esi
pop ebx
ret 4

Function at 0x408050
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x11c]
test ecx, ecx
je 0x4080a3
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x4080a3
push edi
mov edi, dword [esp + 0xc]
cmp edi, 0xffffffff
jne 0x408072
mov edi, dword [esi + 0xc]
push 0
push eax
push ecx
call fcn.00409bc7
mov eax, dword [esi + 0x11c]
mov ecx, dword [esi + 0x14]
push eax
mov eax, dword [esi + 4]
push edi
add ecx, eax
push 1
push ecx
call fcn.0040a226
mov edx, dword [esi + 0x11c]
push edx
call fcn.0040a431
add esp, 0x20
pop edi
pop esi
ret 4

Function at 0x4082dc
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x41ce88]
jne 0x4082e6
repz ret
jmp fcn.0040b888
Function at 0x413861
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.0040a4f0
xor ebx, ebx
cmp dword [0x41ee94], ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
jne 0x413936
push str.USER32.DLL
call dword [sym.imp.kernel32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
jne 0x4138a1
xor eax, eax
jmp 0x4139fa
mov esi, dword [sym.imp.kernel32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x41389a
push eax
call fcn.0040a48d
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x41ee94], eax
call esi
push eax
call fcn.0040a48d
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x41ee98], eax
call esi
push eax
call fcn.0040a48d
mov dword [0x41ee9c], eax
lea eax, [ebp - 8]
push eax
call fcn.0040bbab
test eax, eax
pop ecx
pop ecx
je 0x413904
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040b6e9
add esp, 0x14
cmp dword [ebp - 8], 2
jne 0x413936
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0040a48d
cmp eax, ebx
pop ecx
mov dword [0x41eea4], eax
je 0x413936
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0040a48d
pop ecx
mov dword [0x41eea0], eax
mov eax, dword [0x41eea0]
mov esi, dword [ebp - 0x10]
cmp eax, esi
je 0x4139af
cmp dword [0x41eea4], esi
je 0x4139af
push eax
call fcn.0040a4f9
pop ecx
call eax
cmp eax, ebx
je 0x41397c
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
push dword [0x41eea4]
call fcn.0040a4f9
pop ecx
call eax
test eax, eax
je 0x41397c
test byte [ebp - 0x18], 1
jne 0x4139af
lea eax, [ebp - 0xc]
push eax
call fcn.0040bbe2
test eax, eax
pop ecx
je 0x413997
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040b6e9
add esp, 0x14
cmp dword [ebp - 0xc], 4
jb 0x4139a6
or dword [ebp + 0x10], 0x200000
jmp 0x4139e0
or dword [ebp + 0x10], 0x40000
jmp 0x4139e0
mov eax, dword [0x41ee98]
cmp eax, esi
je 0x4139e0
push eax
call fcn.0040a4f9
pop ecx
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x4139e0
mov eax, dword [0x41ee9c]
cmp eax, esi
je 0x4139e0
push dword [ebp - 4]
push eax
call fcn.0040a4f9
pop ecx
call eax
mov dword [ebp - 4], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
push dword [0x41ee94]
call fcn.0040a4f9
pop ecx
call eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401550
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x22c
mov eax, dword [0x40fbe0]
push ebx
push esi
mov esi, ecx
push edi
xor ebx, ebx
mov dword [esp + 0x234], eax
xor eax, eax
mov word [esp + 0x28], bx
mov ecx, 0x81
lea edi, [esp + 0x2a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea eax, [esp + 0x2c]
push eax
push ebx
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push str...XLBugHandler.dll
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x28], 7
mov dword [esp + 0x24], ebx
mov word [esp + 0x14], bx
call fcn.00403cad
add esp, 4
push eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x14]
call fcn.00401410
cmp dword [esp + 0x24], 8
mov eax, dword [esp + 0x10]
jae 0x4015ee
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, ebx
je 0x401637
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str._XL_SetBugReportRootDir_4
push edi
call ebx
push str._XL_InitBugHandler_20
push edi
mov dword [esi], eax
call ebx
push str._XL_SetPeerID_4
push edi
mov dword [esi + 4], eax
call ebx
push str._XL_SetReportShowMode_4
push edi
mov dword [esi + 8], eax
call ebx
push str._XL_SetAlwaysSendReport_4
push edi
mov dword [esi + 0xc], eax
call ebx
mov dword [esi + 0x10], eax
cmp dword [esp + 0x24], 8
jb 0x40164b
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00403f35
add esp, 4
mov ecx, dword [esp + 0x234]
mov eax, esi
call fcn.00403cf4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401660
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x21c
mov eax, dword [0x40fbe0]
push ebx
push esi
push edi
mov dword [esp + 0x224], eax
xor ebx, ebx
xor eax, eax
mov word [esp + 0x18], bx
mov ecx, 0x81
lea edi, [esp + 0x1a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea eax, [esp + 0x1c]
push eax
push ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x18], ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov edi, eax
cmp edi, ebx
je 0x401708
lea eax, [edi + edi]
push eax
call fcn.004037c8
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x401708
push esi
push edi
push ebx
lea ecx, [esp + 0x24]
push ecx
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x4016ff
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x10]
push eax
push 0x40b344
push esi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
jne 0x40171d
push esi
call fcn.00403f35
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x224]
call fcn.00403cf4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0xc]
movzx ecx, word [eax + 0xc]
movzx edx, word [eax + 0xe]
push ecx
movzx ecx, word [eax + 8]
push edx
movzx edx, word [eax + 0xa]
push ecx
push edx
push 0x40b32c
push 0x168
push 0x410500
call fcn.0040449d
push esi
call fcn.00403f35
mov ecx, dword [esp + 0x244]
add esp, 0x20
mov eax, 0x410500
call fcn.00403cf4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401ad0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x210
mov eax, dword [0x40fbe0]
push esi
push edi
mov dword [esp + 0x214], eax
xor eax, eax
mov word [esp + 8], 0
mov ecx, 0x81
lea edi, [esp + 0xa]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 8]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.XlGameDownloader2_
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [esp + 8]
push edx
call fcn.00401a70
mov ecx, eax
call fcn.004010b0
push 1
call fcn.00401a70
mov ecx, eax
call fcn.004010e0
push 0x104
lea eax, [esp + 0xc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov esi, eax
call fcn.00401660
push eax
push str.0x800
push 0
lea edx, [esp + 0x14]
push edx
push esi
call fcn.00401a70
mov ecx, eax
call fcn.004010c0
mov ecx, dword [esp + 0x214]
call fcn.00403cf4
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x402820
Capabilities:
Check if file exists

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40a5f8
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push esi
mov esi, dword [esp + 0x30]
test esi, esi
je 0x40285c
push esi
call fcn.00403cad
add esp, 4
test eax, eax
jbe 0x40285c
push esi
push 0x4107e8
call fcn.00404537
add esp, 8
push 0x4107e8
mov dword [esp + 0x20], 7
mov dword [esp + 0x1c], 0
mov word [esp + 0xc], 0
call fcn.00403cad
add esp, 4
push eax
push 0x4107e8
lea ecx, [esp + 0xc]
call fcn.00401410
lea eax, [esp + 4]
push eax
mov dword [esp + 0x2c], 0
call fcn.00402580
mov eax, dword [esp + 0x20]
mov esi, 8
add esp, 4
cmp eax, esi
mov eax, dword [esp + 8]
jae 0x4028b9
lea eax, [esp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x4028d9
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 4]
push ecx
call fcn.00402580
add esp, 4
cmp dword [esp + 0x1c], esi
pop esi
jb 0x4028ed
mov edx, dword [esp + 4]
push edx
call fcn.00403f35
add esp, 4
mov ecx, dword [esp + 0x1c]
mov eax, 1
mov dword fs:[0], ecx
add esp, 0x28
ret
Function at 0x4046c2
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x40b690
call fcn.00404ea0
mov edi, 0x94
mov eax, edi
call fcn.00404660
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 [0x410ac8], ecx
mov eax, dword [esi + 4]
mov dword [0x410ad4], eax
mov edx, dword [esi + 8]
mov dword [0x410ad8], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x410acc], esi
cmp ecx, 2
je 0x404722
or esi, 0x8000
mov dword [0x410acc], esi
shl eax, 8
add eax, edx
mov dword [0x410ad0], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40475d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40475d
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x404775
cmp eax, 0x20b
je 0x404762
mov dword [ebp - 0x1c], esi
jmp 0x404789
cmp dword [ecx + 0x84], 0xe
jbe 0x40475d
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x404783
cmp dword [ecx + 0x74], 0xe
jbe 0x40475d
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040543f
pop ecx
test eax, eax
jne 0x4047b5
cmp dword [0x410a48], 1
jne 0x4047a2
call fcn.00407841
push 0x1c
call fcn.004076ca
push 0xff
call fcn.0040693a
pop ecx
pop ecx
call fcn.00407fea
mov dword [ebp - 4], esi
call fcn.00407e3f
test eax, eax
jge 0x4047ce
push 0x1b
call fcn.0040469d
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x412038], eax
call fcn.00407d1d
mov dword [0x410a40], eax
call fcn.00407c7b
test eax, eax
jge 0x4047f4
push 8
call fcn.0040469d
pop ecx
call fcn.00407a48
test eax, eax
jge 0x404805
push 9
call fcn.0040469d
pop ecx
push 1
call fcn.0040696a
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40481b
push eax
call fcn.0040469d
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.004079eb
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40483c
movzx eax, word [ebp - 0x40]
jmp 0x40483f
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004029a0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40485d
push edi
call fcn.00406a95
call fcn.00406ab7
jmp 0x40488f
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00404edb
ret
Function at 0x4051fc
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 0x40522a
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 0x405231
cmp ebx, dword [eax + 4]
jae 0x405231
xor eax, eax
jmp 0x405421
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x405242
xor eax, eax
inc eax
jmp 0x405420
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x405258
cmp ecx, edx
jae 0x40539d
cmp dword [eax + 4], 0
je 0x405261
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x405249
cmp dword [ebp + 8], 0
je 0x405283
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40539d
cmp eax, esi
jae 0x40539d
mov eax, dword [0x410a58]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x4052a8
cmp dword [esi*4 + 0x410a60], edi
je 0x4053a1
inc esi
cmp esi, eax
jl 0x405296
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40541d
cmp dword [ebp - 8], 0x1000000
jne 0x40541d
test byte [ebp - 0xc], 0xcc
je 0x405326
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40541d
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40541d
cmp word [eax + 0x18], 0x10b
jne 0x40541d
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40541d
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x405326
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x405326
test byte [ecx + 0x27], 0x80
jne 0x40539d
push 1
push 0x410aa0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40523a
mov ecx, dword [0x410a58]
test ecx, ecx
mov edx, ecx
jle 0x40535a
lea eax, [ecx*4 + 0x410a5c]
cmp dword [eax], edi
je 0x40535a
dec edx
sub eax, 4
test edx, edx
jg 0x40534e
test edx, edx
jne 0x40538b
push 0xf
pop ebx
cmp ecx, ebx
jg 0x405367
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40537f
lea eax, [edx*4 + 0x410a60]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40536d
cmp ecx, 0x10
jge 0x40538b
inc ecx
mov dword [0x410a58], ecx
push 0
push 0x410aa0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40523a
xor eax, eax
jmp 0x405420
test esi, esi
jle 0x40523a
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x410aa0
call ebx
test eax, eax
jne 0x40523a
cmp dword [esi*4 + 0x410a60], edi
je 0x4053f7
mov eax, dword [0x410a58]
lea esi, [eax - 1]
test esi, esi
jl 0x4053e5
cmp dword [esi*4 + 0x410a60], edi
je 0x4053e1
dec esi
jns 0x4053d5
test esi, esi
jge 0x4053f5
cmp eax, 0x10
jge 0x4053f0
inc eax
mov dword [0x410a58], eax
lea esi, [eax - 1]
jmp 0x4053f7
je 0x40540f
xor ecx, ecx
test esi, esi
jl 0x40540f
lea eax, [ecx*4 + 0x410a60]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4053fd
push 0
push 0x410aa0
call ebx
jmp 0x40523a
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret