joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4389c0
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x464f83
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.00458d24
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], vtable.CBrush.0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.0045e3ba
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.0045f8d6
test eax, eax
je 0x438adc
mov ecx, dword [esp + 0x3c]
call fcn.0045e3e7
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x438aa0
push edi
mov ecx, esi
call fcn.0045ba4b
mov ecx, esi
call fcn.00438c40
cmp dword [esp + 0x38], 1
jne 0x438ad5
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.0045bb86
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x43b500
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x43b533
push esi
call fcn.0043e5f0
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x43b52c
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x43b5b9
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x43b5a2
mov eax, dword [esi + 8]
test eax, eax
je 0x43b557
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x43b59e
cmp eax, 2
je 0x43b5a2
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x43b54a
cmp eax, 3
je 0x43b57d
cmp eax, 1
jne 0x43b54a
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x43b54a
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x43b54a
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.0043b5e0
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x43b5c8
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.0043b5e0
add esp, 4
pop esi
ret

Function at 0x459b1a
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x459b52
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00457bce
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00457ba6
jmp 0x459b5e
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x45b208
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x45b24a
call fcn.00460cc1
mov esi, dword [eax + 0xc]
push pe_nt_image_headers32
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x45b24a
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x45b241
xor eax, eax
jmp 0x45b252
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0045b258
pop edi
pop esi
pop ebx
ret 4

Function at 0x4611f1
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x46121f
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x46123d
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00461157
jmp 0x46123d
mov eax, dword [esi + 0x14]
test eax, eax
je 0x46123d
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00461157
test edi, edi
mov eax, edi
jne 0x461227
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401120
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401139
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40114d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x40116e
cmp esi, eax
jae 0x401147
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401160
cmp esi, eax
jae 0x401147
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x402010
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41a0f8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
mov esi, dword [esp + 0x1c]
mov eax, dword [esi]
mov ecx, dword [eax - 0x10]
mov edx, dword [ecx]
push edi
xor edi, edi
mov dword [esp + 8], edi
call dword [edx + 0x10]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
mov edx, dword [eax - 0xc]
mov ecx, dword [esi]
mov esi, dword [ecx - 0xc]
push edx
push eax
push esi
push ecx
lea ecx, [esp + 0x30]
push ecx
mov dword [esp + 0x28], edi
call fcn.00401e60
mov esi, dword [esp + 0x34]
add esi, 0xfffffff0
push esi
call fcn.00401c90
mov edi, dword [esp + 0x34]
add eax, 0x10
mov dword [edi], eax
add esp, 0x18
mov dword [esp + 0x14], 0xffffffff
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x4020a2
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
mov ecx, dword [esp + 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x403390
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x4033e0
cmp word [esi], 0
je 0x4033e0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4033e0
test al, 0x10
jne 0x4033e0
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x4033c8
test al, 1
jne 0x4033cc
or eax, 1
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
pop esi
ret
test al, 1
jne 0x4033d3
mov eax, 1
pop esi
ret
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x4033f0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get file version info

Disassembly:
sub esp, 8
push ebx
mov ebx, ecx
push ebp
xor eax, eax
push esi
push edi
xor ebp, ebp
mov dword [ebx], ebp
lea esi, [ebx + 0x14]
mov ecx, 0xc2
mov edi, esi
rep stosd dword es:[edi], eax
xor ecx, ecx
lea eax, [ebx + 4]
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov eax, dword [esp + 0x1c]
cmp eax, ebp
push 0x104
je 0x403434
push eax
push esi
call fcn.00405f14
add esp, 0xc
jmp 0x403466
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp word [esi], bp
je 0x403458
push esi
call fcn.004058d6
add esp, 4
cmp word [ebx + eax*2 + 0x12], 0x5c
je 0x403458
push str.drivers_tcpip.sys
jmp 0x40345d
push 0x41ba34
push esi
call fcn.00405ece
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40352b
lea edx, [esp + 0x14]
push edx
push esi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
call sub.VERSION.dll_GetFileVersionInfoSizeW
cmp eax, ebp
mov dword [esp + 0x1c], eax
je 0x40352b
lea edi, [eax + 0xa]
push edi
call fcn.004124ec
mov ebp, eax
mov ecx, edi
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, ebp
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
push ebp
add eax, 2
push eax
push 0
push esi
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x403522
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x20]
push edx
push 0x41ba30
push ebp
mov dword [esp + 0x2c], 0
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x403522
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x403522
cmp dword [esp + 0x10], 0x34
jb 0x403522
movzx ecx, word [eax + 0xa]
mov dword [ebx + 4], ecx
mov edx, dword [eax + 8]
and edx, 0xffff
mov dword [ebx + 8], edx
movzx ecx, word [eax + 0xe]
mov dword [ebx + 0xc], ecx
mov edx, dword [eax + 0xc]
and edx, 0xffff
mov dword [ebx + 0x10], edx
push ebp
call fcn.004124f1
add esp, 4
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 8
ret 4
Function at 0x4051f9
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x41d8a0
call fcn.00406c9c
mov edi, 0x94
mov eax, edi
call fcn.00406690
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 [0x425ab8], ecx
mov eax, dword [esi + 4]
mov dword [0x425ac4], eax
mov edx, dword [esi + 8]
mov dword [0x425ac8], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x425abc], esi
cmp ecx, 2
je 0x405259
or esi, 0x8000
mov dword [0x425abc], esi
shl eax, 8
add eax, edx
mov dword [0x425ac0], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x405294
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x405294
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4052ac
cmp eax, 0x20b
je 0x405299
mov dword [ebp - 0x1c], esi
jmp 0x4052c0
cmp dword [ecx + 0x84], 0xe
jbe 0x405294
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4052ba
cmp dword [ecx + 0x74], 0xe
jbe 0x405294
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00407e83
pop ecx
test eax, eax
jne 0x4052d4
push 0x1c
call fcn.004051d5
pop ecx
call fcn.00407d7a
test eax, eax
jne 0x4052e5
push 0x10
call fcn.004051d5
pop ecx
call fcn.00407b14
mov dword [ebp - 4], esi
call fcn.00407916
test eax, eax
jge 0x4052fe
push 0x1b
call fcn.004051b0
pop ecx
call fcn.00407877
mov dword [0x427490], eax
call fcn.0040770d
mov dword [0x425aac], eax
call fcn.00407677
test eax, eax
jge 0x405323
push 8
call fcn.004051b0
pop ecx
call fcn.00407444
test eax, eax
jge 0x405334
push 9
call fcn.004051b0
pop ecx
push 1
call fcn.0040617d
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40534a
push eax
call fcn.004051b0
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
call fcn.004073fe
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40536b
movzx eax, word [ebp - 0x40]
jmp 0x40536e
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00410686
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40538c
push edi
call fcn.004062aa
call fcn.004062cc
jmp 0x4053be
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00406cd7
ret
Function at 0x4061e7
Capabilities:
Terminate process

Disassembly:
push 8
push 0x41d8f8
call fcn.00406c9c
push 8
call fcn.00408b3f
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x425af8], esi
jne 0x40621b
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x425af4], esi
mov al, byte [ebp + 0x10]
mov byte [0x425af0], al
cmp dword [ebp + 0xc], edi
jne 0x406265
cmp dword [0x427488], edi
je 0x406255
mov eax, dword [0x427484]
sub eax, 4
mov dword [0x427484], eax
cmp eax, dword [0x427488]
jb 0x406255
mov eax, dword [eax]
cmp eax, edi
je 0x406236
call eax
jmp 0x406236
push 0x422080
mov eax, 0x422078
call fcn.00406165
pop ecx
push 0x42208c
mov eax, 0x422084
call fcn.00406165
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x406296
cmp dword [ebp + 0x10], edi
jne 0x4062a4
mov dword [0x425af8], esi
push dword [ebp + 8]
call fcn.00406123
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x4062a3
push 8
call fcn.00408a8a
pop ecx
ret
call fcn.00406cd7
ret

Function at 0x406eaa
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.00406690
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x406f45
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 [0x425ab8]
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 0x406f45
cmp eax, 1
je 0x406f66
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 0x406f45
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x406f12
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x406f41
xor eax, eax
inc eax
jmp 0x406f85
cmp edi, eax
jae 0x406f49
xor eax, eax
jmp 0x406f85
cmp eax, esi
jae 0x406f50
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 [0x425ab8]
jmp 0x406f69
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 0x4070e9
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x422948]
mov ecx, dword [ebp + 0x98]
push ebx
xor eax, ebp
push esi
mov dword [ebp + 0x8c], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x422b18]
je 0x407120
inc eax
cmp eax, 0x13
jb 0x407111
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x422b18]
jne 0x407243
mov eax, dword [0x425ab0]
cmp eax, 1
je 0x40721e
cmp eax, edx
jne 0x407150
cmp dword [0x422944], 1
je 0x40721e
cmp ecx, 0xfc
je 0x407243
push 0x104
lea eax, [ebp - 0x7c]
push eax
push edx
mov byte [ebp + 0x88], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x407186
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.0040bae0
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.00406af0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4071ba
mov eax, edi
push eax
call fcn.00406af0
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x41dd78
push edi
call fcn.0040bbe0
add esp, 0x10
push edi
call fcn.00406af0
push dword [esi + 0x422b1c]
mov ebx, eax
call fcn.00406af0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00406690
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040bae0
push edi
push ebx
call fcn.0040baf0
push 0x41dd58
push ebx
call fcn.0040baf0
push dword [esi + 0x422b1c]
push ebx
call fcn.0040baf0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040b9e2
add esp, 0x2c
jmp 0x407243
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x422b1c]
push dword [esi]
call fcn.00406af0
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]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x8c]
xor ecx, ebp
call fcn.004053fe
add ebp, 0x90
leave
ret
Function at 0x40770d
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x425d1c]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push esi
push edi
xor ebx, ebx
xor esi, esi
xor edi, edi
cmp eax, ebx
jne 0x407756
call ebp
mov esi, eax
cmp esi, ebx
je 0x40773c
mov dword [0x425d1c], 1
jmp 0x40775b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x407751
push 2
pop eax
mov dword [0x425d1c], eax
jmp 0x407756
mov eax, dword [0x425d1c]
cmp eax, 1
jne 0x4077b3
cmp esi, ebx
jne 0x40776e
call ebp
mov esi, eax
cmp esi, ebx
jne 0x40776e
xor eax, eax
jmp 0x40785a
cmp word [esi], bx
mov eax, esi
je 0x407783
inc eax
inc eax
cmp word [eax], bx
jne 0x407775
inc eax
inc eax
cmp word [eax], bx
jne 0x407775
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.00406923
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x4077a6
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
jmp 0x40785a
push ebp
push esi
push edi
call fcn.00406350
add esp, 0xc
jmp 0x407798
cmp eax, 2
je 0x4077bc
cmp eax, ebx
jne 0x407767
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x407767
cmp byte [ebp], bl
mov esi, ebp
je 0x4077f2
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x407767
push esi
add edi, eax
call fcn.00406af0
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x4077cf
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.00406923
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
je 0x40786b
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x40784c
mov ecx, dword [esp + 0x14]
mov eax, esi
sub eax, dword [esp + 0x10]
sar eax, 1
sub ecx, eax
push ecx
push esi
push 0xffffffffffffffff
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x407861
push edi
call fcn.00406af0
push esi
lea edi, [edi + eax + 1]
call fcn.004058d6
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x407812
push ebp
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
push dword [esp + 0x10]
call fcn.00405c5b
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x407767
Function at 0x407877
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x425d20]
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x4078b7
call esi
test eax, eax
je 0x40789c
mov dword [0x425d20], 1
jmp 0x4078bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x4078b3
mov dword [0x425d20], 2
jmp 0x4078c5
xor eax, eax
jmp 0x407913
cmp eax, 1
jne 0x4078c0
call esi
jmp 0x407913
cmp eax, 2
jne 0x4078b3
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebp
push ebp
push 0xffffffffffffffff
mov ebx, eax
push ebx
push 1
push ebp
call edi
mov esi, eax
cmp esi, ebp
je 0x40790b
lea eax, [esi + esi]
push eax
call fcn.00406923
mov ebp, eax
test ebp, ebp
pop ecx
je 0x40790b
push esi
push ebp
push 0xffffffffffffffff
push ebx
push 1
push 0
call edi
test eax, eax
jne 0x40790f
push ebp
call fcn.00405c5b
pop ecx
xor eax, eax
jmp 0x407911
mov eax, ebp
pop edi
pop ebx
pop esi
pop ebp
ret
Function at 0x40a23e
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 0x40a26c
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 0x40a273
cmp ebx, dword [eax + 4]
jae 0x40a273
xor eax, eax
jmp 0x40a463
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40a284
xor eax, eax
inc eax
jmp 0x40a462
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40a29a
cmp ecx, edx
jae 0x40a3df
cmp dword [eax + 4], 0
je 0x40a2a3
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40a28b
cmp dword [ebp + 8], 0
je 0x40a2c5
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40a3df
cmp eax, esi
jae 0x40a3df
mov eax, dword [0x425e88]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40a2ea
cmp dword [esi*4 + 0x425e90], edi
je 0x40a3e3
inc esi
cmp esi, eax
jl 0x40a2d8
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40a45f
cmp dword [ebp - 8], 0x1000000
jne 0x40a45f
test byte [ebp - 0xc], 0xcc
je 0x40a368
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40a45f
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40a45f
cmp word [eax + 0x18], 0x10b
jne 0x40a45f
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40a45f
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40a368
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40a368
test byte [ecx + 0x27], 0x80
jne 0x40a3df
push 1
push 0x425ed0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40a27c
mov ecx, dword [0x425e88]
test ecx, ecx
mov edx, ecx
jle 0x40a39c
lea eax, [ecx*4 + 0x425e8c]
cmp dword [eax], edi
je 0x40a39c
dec edx
sub eax, 4
test edx, edx
jg 0x40a390
test edx, edx
jne 0x40a3cd
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40a3a9
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40a3c1
lea eax, [edx*4 + 0x425e90]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40a3af
cmp ecx, 0x10
jge 0x40a3cd
inc ecx
mov dword [0x425e88], ecx
push 0
push 0x425ed0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40a27c
xor eax, eax
jmp 0x40a462
test esi, esi
jle 0x40a27c
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x425ed0
call ebx
test eax, eax
jne 0x40a27c
cmp dword [esi*4 + 0x425e90], edi
je 0x40a439
mov eax, dword [0x425e88]
lea esi, [eax - 1]
test esi, esi
jl 0x40a427
cmp dword [esi*4 + 0x425e90], edi
je 0x40a423
dec esi
jns 0x40a417
test esi, esi
jge 0x40a437
cmp eax, 0x10
jge 0x40a432
inc eax
mov dword [0x425e88], eax
lea esi, [eax - 1]
jmp 0x40a439
je 0x40a451
xor ecx, ecx
test esi, esi
jl 0x40a451
lea eax, [ecx*4 + 0x425e90]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40a43f
push 0
push 0x425ed0
call ebx
jmp 0x40a27c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret