joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4308e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ecx
push edx
sub esp, 4
mov dword [esp], eax
mov eax, dword [0x45faa4]
test eax, eax
je 0x4308fc
cmp dword [0x45f8e4], 0xfffffffe
jne 0x430902
xor eax, eax
add esp, 4
pop edx
pop ecx
ret
mov eax, esp
call fcn.00430890
test eax, eax
je 0x4308fc
push 0x40
push 0x1000
mov ecx, dword [esp + 8]
push ecx
push 0
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov edx, eax
test eax, eax
je 0x4308fc
mov eax, dword [esp]
sub eax, 4
cmp eax, dword [esp]
ja 0x4308fa
mov dword [esp], eax
cmp eax, 0x38
jb 0x4308fa
mov dword [edx], eax
mov eax, edx
call fcn.00430810
mov ecx, eax
mov eax, dword [eax]
mov dword [esp], eax
or al, 1
mov dword [ecx], eax
mov dword [edx + 0x14], 0
lea eax, [ecx + 4]
inc dword [edx + 0x18]
call fcn.0042c770
mov eax, 1
add esp, 4
pop edx
pop ecx
ret

Function at 0x4312d0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
push edi
push ebp
sub esp, 8
mov esi, eax
mov ebp, edx
mov edi, ebx
test eax, eax
jl 0x431364
cmp eax, dword [0x45faac]
jae 0x431364
call fcn.00435130
mov edx, eax
mov dword [esp + 4], eax
mov eax, esi
xor ebx, ebx
call fcn.00437440
test al, 0x80
je 0x431328
mov eax, esi
call dword [0x45f8a0]
push 2
push 0
push 0
push edx
mov ebx, 1
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, 0xffffffff
je 0x431375
push 0
lea eax, [esp + 4]
push eax
push edi
push ebp
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x431389
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, eax
cmp ebx, 1
jne 0x431355
mov eax, esi
call dword [0x45f8a4]
mov eax, edx
call fcn.00430c70
add esp, 8
pop ebp
pop edi
pop esi
pop ecx
ret
mov eax, 4
call fcn.00430ac8
mov eax, 0xffffffff
jmp 0x43135c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ebx, eax
mov eax, esi
call dword [0x45f8a4]
mov eax, ebx
jmp 0x431357
cmp edi, dword [esp]
je 0x431398
mov eax, 0xc
call fcn.00430ac8
cmp ebx, 1
jne 0x4313a5
mov eax, esi
call dword [0x45f8a4]
mov eax, dword [esp]
add esp, 8
pop ebp
pop edi
pop esi
pop ecx
ret

Function at 0x4315f0
Capabilities:
Read file on windows

Disassembly:
push ecx
sub esp, 4
test eax, eax
jl 0x431621
cmp eax, dword [0x45faac]
jae 0x431621
push 0
lea ecx, [esp + 4]
push ecx
push ebx
push edx
call fcn.00435130
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x431635
mov eax, dword [esp]
add esp, 4
pop ecx
ret
mov eax, 4
call fcn.00430ac8
mov eax, 0xffffffff
add esp, 4
pop ecx
ret
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, eax
call fcn.00430c70
cmp edx, 0x6d
jne 0x43164d
cmp dword [esp], 0
je 0x431619
mov eax, 0xffffffff
add esp, 4
pop ecx
ret
Function at 0x432af0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ecx
push esi
test edx, edx
je 0x432bdd
not eax
cmp ebx, 8
jb 0x432bb6
mov esi, 0xff
xor ecx, ecx
mov cl, byte [edx]
xor ecx, eax
and ecx, esi
shr eax, 8
xor eax, dword [ecx*4 + 0x4536fc]
xor ecx, ecx
mov cl, byte [edx + 1]
xor ecx, eax
and ecx, esi
shr eax, 8
xor eax, dword [ecx*4 + 0x4536fc]
xor ecx, ecx
mov cl, byte [edx + 2]
xor ecx, eax
and ecx, esi
shr eax, 8
xor eax, dword [ecx*4 + 0x4536fc]
xor ecx, ecx
mov cl, byte [edx + 3]
xor ecx, eax
and ecx, esi
shr eax, 8
xor eax, dword [ecx*4 + 0x4536fc]
xor ecx, ecx
mov cl, byte [edx + 4]
xor ecx, eax
and ecx, esi
shr eax, 8
xor eax, dword [ecx*4 + 0x4536fc]
xor ecx, ecx
mov cl, byte [edx + 5]
xor ecx, eax
add edx, 2
and ecx, esi
shr eax, 8
xor eax, dword [ecx*4 + 0x4536fc]
xor ecx, ecx
mov cl, byte [edx + 4]
add edx, 3
xor ecx, eax
and ecx, esi
shr eax, 8
xor eax, dword [ecx*4 + 0x4536fc]
xor ecx, ecx
sub ebx, 8
mov cl, byte [edx + 2]
add edx, 3
xor ecx, eax
and ecx, esi
shr eax, 8
xor eax, dword [ecx*4 + 0x4536fc]
cmp ebx, 8
jae 0x432b0a
test ebx, ebx
je 0x432bd4
xor ecx, ecx
mov cl, byte [edx]
xor ecx, eax
and ecx, 0xff
shr eax, 8
inc edx
xor eax, dword [ecx*4 + 0x4536fc]
dec ebx
jne 0x432bba
mov ecx, eax
not ecx
mov eax, ecx
pop esi
pop ecx
ret
xor ecx, ecx
mov eax, ecx
pop esi
pop ecx
ret

Function at 0x437820
Capabilities:
Terminate process
Write file on windows

Disassembly:
push ecx
push esi
push edi
sub esp, 8
mov esi, eax
mov edi, edx
xor edx, edx
mov ecx, eax
inc eax
cmp byte [ecx], 0
je 0x437837
inc edx
jmp 0x43782c
push 0
lea eax, [esp + 4]
push eax
push edx
push esi
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.DLL_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push 0
lea eax, [esp + 4]
push eax
push 2
lea eax, [esp + 0x10]
push eax
push 0xfffffffffffffff4
mov word [esp + 0x18], 0xa0d
call dword [sym.imp.KERNEL32.DLL_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, edi
jmp 0x4305c0
Function at 0x404318
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00406350
test esi, esi
jne 0x40434e
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00406454
jmp 0x40436c
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004041f8
mov edi, eax
test esi, esi
je 0x40436c
cmp dword [ebx], 0
je 0x40436c
dec esi
jmp 0x404355
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

Function at 0x405444
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff0
mov edi, edx
mov esi, eax
mov ebp, dword [esi + 0x10]
mov eax, esi
call fcn.004058f4
mov byte [esp], al
cmp byte [esp], 0
jne 0x4055cd
test edi, edi
je 0x4055cd
mov byte [esp + 1], 0
test ebp, ebp
jle 0x40550d
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
xor eax, eax
mov dword [esp + 0xc], eax
test ebp, ebp
jle 0x4054e8
cmp edi, 0xffffffff
je 0x4054a9
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x4054a9
mov byte [esp], 0
jmp 0x4055cd
cmp dword [esi], 1
jg 0x4054e8
cmp dword [esi], 0
jne 0x4054da
xor eax, eax
mov edx, 1
lock cmpxchg dword [esi], edx
test eax, eax
jne 0x4054da
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x4055cd
lea eax, [esp + 0xc]
call fcn.004050dc
dec ebp
test ebp, ebp
jg 0x40548e
cmp edi, 0xffffffff
je 0x40550d
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x40550b
mov byte [esp], 0
jmp 0x4055cd
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x405452
lea edx, [ebx + 2]
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x40550d
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call fcn.00405648
mov edx, eax
mov ebx, dword [0x40f8e4]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x405571
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x40556f
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x405571
xor edi, edi
cmp byte [esp], 0
je 0x405597
mov ebx, dword [esi]
test bl, 1
jne 0x4055ad
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x405577
mov byte [esp + 1], 1
jmp 0x4055ad
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x405597
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x405524
cmp byte [esp], 0
je 0x4055cd
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
movzx eax, byte [esp]
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x406120
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x40f040], 0
je 0x406187
cmp word [0x40f330], 0xd7b2
jne 0x406149
cmp dword [0x40f338], 0
jbe 0x406149
mov eax, 0x40f32c
call dword [0x40f348]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
mov eax, 0x4061b4
call fcn.00406590
push eax
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x40e01e], 0
jne 0x4061a3
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x409014
Capabilities:
Get system information on windows

Disassembly:
add esp, 0xffffffdc
push esp
call sub.kernel32.dll_GetSystemInfo
mov eax, dword [esp + 0x14]
add esp, 0x24
ret

Function at 0x40a770
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa0
push ebx
xor ecx, ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00406444
mov eax, dword [ebp - 8]
call fcn.00406444
xor eax, eax
push ebp
push 0x40a846
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 8], 0
je 0x40a7c5
push 0x40a860
push dword [ebp - 4]
push 0x40a870
push dword [ebp - 8]
lea eax, [ebp - 0xc]
mov edx, 4
call fcn.00406730
jmp 0x40a7df
push 0x40a860
push dword [ebp - 4]
push 0x40a860
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00406730
lea eax, [ebp - 0x50]
xor ecx, ecx
mov edx, 0x44
call fcn.004044e4
mov dword [ebp - 0x50], 0x44
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x50]
push eax
push 0
push 0
push 0x200
push 0
push 0
push 0
mov eax, dword [ebp - 0xc]
call fcn.004065a0
push eax
mov eax, dword [ebp - 4]
call fcn.004065a0
push eax
call sub.kernel32.dll_CreateProcessW
cmp eax, 1
sbb ebx, ebx
inc ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40a84d
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004063b0
pop eax
jmp eax

Function at 0x40a878
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.004065a0
push eax
call 0x409f6c
cmp eax, 0xffffffff
je 0x40a891
test al, 0x10
jne 0x40a895
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret
Function at 0x4282a0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x17000]
push edi
jmp 0x4282ba
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x4282c1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4282b0
mov eax, 1
add ebx, ebx
jne 0x4282d3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x4282c8
jne 0x4282e4
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4282c8
xor ecx, ecx
sub eax, 3
jb 0x4282f8
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x42836a
mov ebp, eax
add ebx, ebx
jne 0x428303
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x428310
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x428334
inc ecx
add ebx, ebx
jne 0x428320
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x428315
jne 0x428331
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x428315
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x428354
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x428345
jmp 0x4282b6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x428354
add edi, ecx
jmp 0x4282b6
pop esi
mov edi, esi
mov ecx, 0x115
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x428372
cmp byte [edi], 3
jne 0x428372
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x428377
lea edi, [esi + 0x26000]
mov eax, dword [edi]
or eax, eax
je 0x4283e6
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x28000]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x280c4]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x4283a4
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x280cc]
or eax, eax
je 0x4283e0
mov dword [ebx], eax
add ebx, 4
jmp 0x4283c1
call dword [esi + 0x280c8]
mov ebp, dword [esi + 0x280d0]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x1ef]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x42841a
sub esp, 0xffffff80
jmp 0x409ac0

Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43000c
nop
nop
nop
nop
nop
pop eax
add eax, 0x403d6f
nop
nop
sub eax, 0x403d15
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
nop
cmp ebx, ecx
nop
nop
jl 0x430030
nop
nop
nop
nop
nop
nop
nop
add eax, 0xc
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x43001e
nop
nop
nop
nop
nop
nop
nop
popal
jmp loc.00401219
Function at 0x4041d2
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x408138
call fcn.00404f5c
mov edi, 0x94
mov eax, edi
call fcn.004050c0
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 [0x46c3bc], ecx
mov eax, dword [esi + 4]
mov dword [0x46c3c8], eax
mov edx, dword [esi + 8]
mov dword [0x46c3cc], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x46c3c0], esi
cmp ecx, 2
je 0x404232
or esi, 0x8000
mov dword [0x46c3c0], esi
shl eax, 8
add eax, edx
mov dword [0x46c3c4], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40426d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40426d
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x404285
cmp eax, 0x20b
je 0x404272
mov dword [ebp - 0x1c], esi
jmp 0x404299
cmp dword [ecx + 0x84], 0xe
jbe 0x40426d
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x404293
cmp dword [ecx + 0x74], 0xe
jbe 0x40426d
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00404f0b
pop ecx
test eax, eax
jne 0x4042c5
cmp dword [0x46c3ac], 1
jne 0x4042b2
call fcn.004046c0
push 0x1c
call fcn.00404549
push 0xff
call fcn.004043ae
pop ecx
pop ecx
call fcn.00404e69
mov dword [ebp - 4], esi
call fcn.00404cbe
test eax, eax
jge 0x4042de
push 0x1b
call fcn.004041ad
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x46c934], eax
call fcn.00404b9c
mov dword [0x46c3a4], eax
call fcn.00404afa
test eax, eax
jge 0x404304
push 8
call fcn.004041ad
pop ecx
call fcn.004048c7
test eax, eax
jge 0x404315
push 9
call fcn.004041ad
pop ecx
push 1
call fcn.004043de
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40432b
push eax
call fcn.004041ad
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040486a
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40434c
movzx eax, word [ebp - 0x40]
jmp 0x40434f
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401100
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40436d
push edi
call fcn.00404509
call fcn.0040452b
jmp 0x40439f
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00404f97
ret
Function at 0x404448
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x46c3fc], esi
push edi
jne 0x404468
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 [0x46c3f8], esi
mov byte [0x46c3f4], al
jne 0x4044ce
mov ecx, dword [0x46c928]
test ecx, ecx
je 0x4044af
mov eax, dword [0x46c924]
sub eax, 4
cmp eax, ecx
jmp 0x4044a8
mov eax, dword [eax]
test eax, eax
je 0x40449a
call eax
mov eax, dword [0x46c924]
sub eax, 4
cmp eax, dword [0x46c928]
mov dword [0x46c924], eax
jae 0x404492
mov eax, 0x40a01c
mov esi, 0x40a020
cmp eax, esi
mov edi, eax
jae 0x4044ce
mov eax, dword [edi]
test eax, eax
je 0x4044c7
call eax
add edi, 4
cmp edi, esi
jb 0x4044bf
mov eax, 0x40a024
mov esi, 0x40a028
cmp eax, esi
mov edi, eax
jae 0x4044ed
mov eax, dword [edi]
test eax, eax
je 0x4044e6
call eax
add edi, 4
cmp edi, esi
jb 0x4044de
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x404507
push dword [ebp + 8]
mov dword [0x46c3fc], 1
call fcn.004043ae
pop ebp
ret

Function at 0x404549
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x46c270]
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 + 0x46c140]
je 0x40457e
inc eax
cmp eax, 0x13
jb 0x40456f
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x46c140]
jne 0x4046a4
mov eax, dword [0x46c3ac]
cmp eax, 1
je 0x40467c
cmp eax, edx
jne 0x4045ae
cmp dword [0x46c138], 1
je 0x40467c
cmp ecx, 0xfc
je 0x4046a4
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 0x4045e4
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00404020
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.004053f0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x404618
mov eax, edi
push eax
call fcn.004053f0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x408550
push edi
call fcn.004052c0
add esp, 0x10
push edi
call fcn.004053f0
push dword [esi + 0x46c144]
mov ebx, eax
call fcn.004053f0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004050c0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00404020
push edi
push ebx
call fcn.00404030
push 0x408530
push ebx
call fcn.00404030
push dword [esi + 0x46c144]
push ebx
call fcn.00404030
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.004051b9
add esp, 0x2c
jmp 0x4046a4
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x46c144]
push dword [esi]
call fcn.004053f0
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.004054ac
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x4051b9
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x46c514], ebx
push esi
push edi
jne 0x405239
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x405274
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x46c514], eax
je 0x405274
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x46c518], eax
call esi
cmp dword [0x46c3bc], 2
mov dword [0x46c51c], eax
jne 0x405239
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x46c524], eax
je 0x405239
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x46c520], eax
mov eax, dword [0x46c520]
test eax, eax
je 0x40527e
call eax
test eax, eax
je 0x405265
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x46c524]
test eax, eax
je 0x405265
test byte [ebp - 8], 1
jne 0x40527e
cmp dword [0x46c3c8], 4
jb 0x405278
or byte [ebp + 0x12], 0x20
jmp 0x40529d
xor eax, eax
jmp 0x4052ad
or byte [ebp + 0x12], 4
jmp 0x40529d
mov eax, dword [0x46c518]
test eax, eax
je 0x40529d
call eax
mov ebx, eax
test ebx, ebx
je 0x40529d
mov eax, dword [0x46c51c]
test eax, eax
je 0x40529d
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x46c514]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4068fe
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 0x40692c
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 0x406933
cmp ebx, dword [eax + 4]
jae 0x406933
xor eax, eax
jmp 0x406b23
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x406944
xor eax, eax
inc eax
jmp 0x406b22
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40695a
cmp ecx, edx
jae 0x406a9f
cmp dword [eax + 4], 0
je 0x406963
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40694b
cmp dword [ebp + 8], 0
je 0x406985
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x406a9f
cmp eax, esi
jae 0x406a9f
mov eax, dword [0x46c530]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x4069aa
cmp dword [esi*4 + 0x46c538], edi
je 0x406aa3
inc esi
cmp esi, eax
jl 0x406998
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x406b1f
cmp dword [ebp - 8], 0x1000000
jne 0x406b1f
test byte [ebp - 0xc], 0xcc
je 0x406a28
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x406b1f
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x406b1f
cmp word [eax + 0x18], 0x10b
jne 0x406b1f
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x406b1f
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x406a28
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x406a28
test byte [ecx + 0x27], 0x80
jne 0x406a9f
push 1
push 0x46c578
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40693c
mov ecx, dword [0x46c530]
test ecx, ecx
mov edx, ecx
jle 0x406a5c
lea eax, [ecx*4 + 0x46c534]
cmp dword [eax], edi
je 0x406a5c
dec edx
sub eax, 4
test edx, edx
jg 0x406a50
test edx, edx
jne 0x406a8d
push 0xf
pop ebx
cmp ecx, ebx
jg 0x406a69
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x406a81
lea eax, [edx*4 + 0x46c538]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x406a6f
cmp ecx, 0x10
jge 0x406a8d
inc ecx
mov dword [0x46c530], ecx
push 0
push 0x46c578
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40693c
xor eax, eax
jmp 0x406b22
test esi, esi
jle 0x40693c
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x46c578
call ebx
test eax, eax
jne 0x40693c
cmp dword [esi*4 + 0x46c538], edi
je 0x406af9
mov eax, dword [0x46c530]
lea esi, [eax - 1]
test esi, esi
jl 0x406ae7
cmp dword [esi*4 + 0x46c538], edi
je 0x406ae3
dec esi
jns 0x406ad7
test esi, esi
jge 0x406af7
cmp eax, 0x10
jge 0x406af2
inc eax
mov dword [0x46c530], eax
lea esi, [eax - 1]
jmp 0x406af9
je 0x406b11
xor ecx, ecx
test esi, esi
jl 0x406b11
lea eax, [ecx*4 + 0x46c538]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x406aff
push 0
push 0x46c578
call ebx
jmp 0x40693c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret