joyce8/EMBER2024-capa huggingface dataset:
Function at 0x295780
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.0029c690
mov eax, dword [0x2a8038]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
push edi
push 4
mov esi, ecx
lea eax, [ebp - 0x1008]
push eax
push dword [esi]
mov ebx, edx
mov dword [ebp - 0x100c], esi
call dword [fcn.002a21d4]
cmp eax, 4
je 0x2957d0
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.002958aa
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x1008], edi
jbe 0x295820
jmp 0x2957e0
push 0
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [esi]
call dword [fcn.002a21d4]
mov esi, eax
test esi, esi
je 0x295820
push dword [ebx]
lea eax, [ebp - 0x1004]
push esi
push 1
push eax
call fcn.002961fa
add edi, esi
mov esi, dword [ebp - 0x100c]
add esp, 0x10
cmp edi, dword [ebp - 0x1008]
jb 0x2957e0
push dword [ebx]
call fcn.0029602c
mov ecx, dword [ebp - 4]
add esp, 4
cmp edi, dword [ebp - 0x1008]
pop edi
sbb eax, eax
pop esi
xor ecx, ebp
inc eax
pop ebx
call fcn.002958aa
mov esp, ebp
pop ebp
ret

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

Disassembly:
pushal
nop
nop
nop
mov eax, section..text
nop
nop
nop
push 4
nop
nop
nop
nop
pop edi
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
je 0x430072
nop
nop
mov ebx, 0x408ed0
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
div edi
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
mov esi, 0x74e64abf
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
nop
add eax, edi
nop
loop 0x430060
nop
nop
nop
nop
nop
mov eax, section..data
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x4300d2
nop
nop
mov ebx, 0x42e1d0
nop
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
mov eax, ecx
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
pop eax
nop
nop
nop
mov esi, 0x68ba40cc
nop
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
loop 0x4300c0
nop
popal
nop
nop
nop
nop
jmp 0x401219
Function at 0x406b2c
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.004043f0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x406bc7
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 [0x4092e4]
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 0x406bc7
cmp eax, 1
je 0x406be8
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 0x406bc7
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x406b94
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x406bc3
xor eax, eax
inc eax
jmp 0x406c07
cmp edi, eax
jae 0x406bcb
xor eax, eax
jmp 0x406c07
cmp eax, esi
jae 0x406bd2
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 [0x4092e4]
jmp 0x406beb
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 0x430005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
call 0x43000c
nop
nop
nop
pop eax
nop
nop
add eax, 0x403d6a
nop
sub eax, 0x403d10
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
mov edx, dword [eax + 8]
nop
xor dword [ebx], edx
nop
nop
nop
nop
nop
add ebx, 4
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
jl 0x430030
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
nop
nop
cmp dword [eax], 0
nop
jne 0x43001e
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp loc.00401219
Function at 0x431000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
mov ebx, 0x40915c
mov ecx, 0x76747b16
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x43104e
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x431024
nop
nop
nop
mov eax, section..data
mov ebx, 0x42f3f8
nop
mov ecx, 0x77d837a8
nop
nop
nop
nop
nop
test eax, eax
je 0x431084
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
add eax, 4
nop
nop
nop
nop
nop
cmp eax, ebx
nop
jne 0x43106c
nop
nop
nop
nop
nop
nop
nop
nop
popal
nop
jmp 0x401219
Function at 0x402829
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40283e
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x402850
xor eax, eax
jmp 0x402882
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x402874
cmp esi, eax
jae 0x40284c
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x402866
cmp esi, eax
jae 0x40284c
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop ebp
ret

Function at 0x4055fc
Capabilities:
Log keystrokes via application hook

Disassembly:
mov eax, 0x4a0191
call fcn.0040e97c
sub esp, 0xc
push esi
push 0
mov esi, ecx
push 0x4ce50c
lea ecx, [ebp - 0x18]
call fcn.0040def1
and dword [ebp - 4], 0
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call fcn.0040deba
cmp dword [0x4ce508], 0
jne 0x40564d
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0
push 0x4050c5
push 2
call dword [sym.imp.USER32.dll_SetWindowsHookExA]
mov dword [0x4ce508], eax
push dword [esi + 0x1c]
mov ecx, 0x4ce52c
push dword [0x4ce534]
call fcn.00471eca
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.0040decf
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
leave
ret
Function at 0x4094fa
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x4a054c
call fcn.0040e97c
sub esp, 0x1c
mov eax, dword [ebp + 8]
cmp dword [eax + 0x18], 0x10
jb 0x409515
mov eax, dword [eax + 4]
jmp 0x409518
add eax, 4
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x4a7fe4
push eax
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x40956d
push eax
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
lea ecx, [ebp - 0x28]
call fcn.0040238b
mov ecx, dword [ebp + 0xc]
and dword [ebp - 4], 0
lea eax, [ebp - 0x28]
push eax
add ecx, 0xc
call fcn.004075ff
push 1
lea ecx, [ebp - 0x28]
call fcn.00401c17
mov ecx, dword [ebp - 0xc]
mov al, 1
pop esi
mov dword fs:[0], ecx
leave
ret 8

Function at 0x4095fa
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x4a04c7
call fcn.0040e97c
sub esp, 0x58
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
push 0x10
xor ebx, ebx
pop edi
mov dword [esi], 0x400
cmp dword [eax + 0x18], edi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], 7
jb 0x40962f
mov eax, dword [eax + 4]
jmp 0x409632
add eax, 4
lea ecx, [ebp - 0x10]
push ecx
push 0x20019
push ebx
push eax
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
mov dword [ebp + 0x14], eax
je 0x4096a5
mov eax, dword [ebp + 0x10]
mov dword [esi], ebx
cmp dword [eax + 0x18], edi
jb 0x40965c
mov eax, dword [eax + 4]
jmp 0x40965f
add eax, 4
push eax
push 0x4ce558
call fcn.0040f630
push dword [ebp + 0x14]
lea eax, [ebp - 0x48]
push eax
call fcn.0040957e
add esp, 0x10
cmp dword [eax + 0x18], edi
mov dword [ebp - 4], ebx
jb 0x409686
mov eax, dword [eax + 4]
jmp 0x409689
add eax, 4
mov dword [ebp + 0x14], eax
lea eax, [ebp + 0x14]
push eax
lea ecx, [ebp - 0x20]
call fcn.0040f13d
push 0x4bd398
lea eax, [ebp - 0x20]
jmp 0x409732
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x18], edi
jb 0x4096b2
mov eax, dword [eax + 4]
jmp 0x4096b5
add eax, 4
push esi
mov edi, 0x4ce558
push edi
lea ecx, [ebp - 0x14]
push ecx
push ebx
push eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4096eb
mov eax, dword [ebp + 0x10]
mov dword [esi], ebx
cmp dword [eax + 0x18], 0x10
jb 0x4096df
mov eax, dword [eax + 4]
jmp 0x4096e2
add eax, 4
push eax
push edi
call fcn.0040f630
pop ecx
pop ecx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp eax, ebx
je 0x409738
push eax
lea eax, [ebp - 0x64]
push eax
mov dword [esi], ebx
call fcn.0040957e
pop ecx
pop ecx
cmp dword [eax + 0x18], 0x10
mov dword [ebp - 4], 1
jb 0x409718
mov eax, dword [eax + 4]
jmp 0x40971b
add eax, 4
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040f13d
push 0x4bd398
lea eax, [ebp - 0x2c]
push eax
call fcn.0040f0f2
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x40a1c8
Capabilities:
Initialize winsock library

Disassembly:
mov eax, 0x4a05c3
call fcn.0040e97c
sub esp, 0x274
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0x14], ebx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], ebx
jne 0x40a20d
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x14], str.hostname_must_be_not_null
call fcn.0040f13d
push 0x4bd398
lea eax, [ebp - 0x30]
jmp 0x40a2e0
lea eax, [ebp - 0x27c]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40a243
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x14], str.Failed_to_initialize_Winsock_1.1_Stack
call fcn.0040f13d
push 0x4bd398
lea eax, [ebp - 0x3c]
jmp 0x40a2e0
lea edi, [esi + 0x70]
push 0x4a6b73
mov ecx, edi
call fcn.0040230b
cmp dword [esi + 0x18], 0x10
jb 0x40a25d
mov eax, dword [esi + 4]
jmp 0x40a260
lea eax, [esi + 4]
push ebx
push ebx
push ebx
push 0x20
push 0x1388
push 0x33
lea ecx, [ebp - 0x24]
push ecx
push eax
lea ecx, [ebp - 0x1c]
call fcn.0040c89b
cmp eax, ebx
jne 0x40a2e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.0040957e
pop ecx
pop ecx
push 0xffffffffffffffff
push ebx
push eax
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.004020ca
push 1
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], bl
call fcn.00401c17
push 0x4a6b73
lea ecx, [esi + 0x54]
call fcn.0040230b
cmp dword [edi + 0x18], 0x10
jb 0x40a2c6
mov eax, dword [edi + 4]
mov dword [ebp - 0x14], eax
jmp 0x40a2cc
add edi, 4
mov dword [ebp - 0x14], edi
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x48]
call fcn.0040f13d
push 0x4bd398
lea eax, [ebp - 0x48]
push eax
call fcn.0040f0f2
push 1
push 3
lea ecx, [ebp - 0xec]
call fcn.00402054
push dword [ebp - 0x20]
lea ecx, [ebp - 0xe4]
mov byte [ebp - 4], 2
call fcn.004078e1
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0xec]
call fcn.00409bc6
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esi + 0x54]
mov byte [ebp - 4], 3
call fcn.004020ca
push 1
lea ecx, [ebp - 0x64]
call fcn.00401c17
call dword [sym.imp.WS2_32.dll_WSACleanup]
lea ecx, [ebp - 0x98]
mov byte [ebp - 4], bl
call fcn.00401d02
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x98], 0x4a69ec
call fcn.0045e55a
mov al, 1
jmp 0x40a381
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret

Function at 0x40c6d4
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [ebp + 0xc]
xor edx, edx
mov ecx, 0x3e8
div ecx
mov dword [ebp - 0x10c], 1
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x108], eax
lea eax, [ebp - 8]
push eax
push 0
push 0
lea eax, [ebp - 0x10c]
push eax
push 0
mov dword [ebp - 4], edx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x40c722
xor eax, eax
leave
ret
xor ecx, ecx
test eax, eax
mov eax, dword [ebp + 0x10]
setne cl
mov dword [eax], ecx
xor eax, eax
inc eax
leave
ret
Function at 0x410679
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4ad238
call fcn.0040f5d0
mov edi, 0x94
mov eax, edi
call fcn.0040f3e0
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 [0x4d0a6c], ecx
mov eax, dword [esi + 4]
mov dword [0x4d0a78], eax
mov edx, dword [esi + 8]
mov dword [0x4d0a7c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4d0a70], esi
cmp ecx, 2
je 0x4106d9
or esi, 0x8000
mov dword [0x4d0a70], esi
shl eax, 8
add eax, edx
mov dword [0x4d0a74], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x410714
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x410714
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x41072c
cmp eax, 0x20b
je 0x410719
mov dword [ebp - 0x1c], esi
jmp 0x410740
cmp dword [ecx + 0x84], 0xe
jbe 0x410714
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x41073a
cmp dword [ecx + 0x74], 0xe
jbe 0x410714
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.004139f4
pop ecx
test eax, eax
jne 0x410754
push 0x1c
call fcn.00410655
pop ecx
call fcn.00412d8b
test eax, eax
jne 0x410765
push 0x10
call fcn.00410655
pop ecx
call fcn.0041b4b8
mov dword [ebp - 4], esi
call fcn.0041b2ba
test eax, eax
jge 0x41077e
push 0x1b
call fcn.00410630
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4d3010], eax
call fcn.0041b198
mov dword [0x4d0a5c], eax
call fcn.0041b0f6
test eax, eax
jge 0x4107a4
push 8
call fcn.00410630
pop ecx
call fcn.0041aec3
test eax, eax
jge 0x4107b5
push 9
call fcn.00410630
pop ecx
call fcn.00410900
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x4107c8
push eax
call fcn.00410630
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0041ae5a
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x4107e9
movzx eax, word [ebp - 0x34]
jmp 0x4107ec
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.0046e908
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x41080a
push edi
call fcn.00410a38
call fcn.00410a5a
jmp 0x41083c
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040f60b
ret
Function at 0x410965
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push 8
call fcn.00412f7e
xor esi, esi
inc esi
cmp dword [0x4d0aac], esi
pop ecx
jne 0x41098d
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 [0x4d0aa8], esi
mov byte [0x4d0aa4], al
jne 0x4109f3
mov ecx, dword [0x4d3008]
test ecx, ecx
je 0x4109d4
mov eax, dword [0x4d3004]
sub eax, 4
cmp eax, ecx
jmp 0x4109cd
mov eax, dword [eax]
test eax, eax
je 0x4109bf
call eax
mov eax, dword [0x4d3004]
sub eax, 4
cmp eax, dword [0x4d3008]
mov dword [0x4d3004], eax
jae 0x4109b7
mov eax, 0x4cb258
mov esi, 0x4cb260
cmp eax, esi
mov edi, eax
jae 0x4109f3
mov eax, dword [edi]
test eax, eax
je 0x4109ec
call eax
add edi, 4
cmp edi, esi
jb 0x4109e4
mov eax, 0x4cb264
mov esi, 0x4cb26c
cmp eax, esi
mov edi, eax
jae 0x410a12
mov eax, dword [edi]
test eax, eax
je 0x410a0b
call eax
add edi, 4
cmp edi, esi
jb 0x410a03
cmp dword [ebp + 0x10], 0
pop edi
pop esi
je 0x410a23
push 8
call fcn.00412eea
jmp 0x410a35
push dword [ebp + 8]
mov dword [0x4d0aac], 1
call fcn.004108be
pop ecx
pop ebp
ret
Function at 0x414834
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x4cc468]
xor eax, dword [ebp + 4]
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
jne 0x41485d
xor eax, eax
jmp 0x4149cb
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x4d1c80]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x414890
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.0041d940
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x414962
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x41499d
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x420]
mov dword [ebp - 0xc], edi
cmp ecx, dword [ebp + 0x10]
jae 0x4148eb
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4148dc
inc dword [ebp - 0x18]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0xc]
mov byte [eax], dl
inc eax
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x400
jl 0x4148bf
mov edi, eax
lea eax, [ebp - 0x420]
sub edi, eax
push 0
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41492b
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x414934
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x4148b0
jmp 0x414936
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x4149c6
cmp dword [ebp - 8], edi
je 0x41499d
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x41498f
call fcn.00411c51
mov dword [eax], 9
call fcn.00411c5a
mov dword [eax], esi
jmp 0x414998
push edi
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x414984
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x414936
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x414936
push dword [ebp - 8]
call fcn.00411c63
pop ecx
or eax, 0xffffffff
jmp 0x4149c9
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4149b2
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x4149b2
xor eax, eax
jmp 0x4149c9
call fcn.00411c51
mov dword [eax], 0x1c
call fcn.00411c5a
mov dword [eax], edi
jmp 0x414998
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.0041087c
leave
ret
Function at 0x41ab46
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4cc468]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4ccc90]
je 0x41ab73
inc eax
cmp eax, 0x12
jb 0x41ab64
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4ccc90]
jne 0x41aca7
mov eax, dword [0x4d0a64]
cmp eax, 1
je 0x41ac82
cmp eax, edx
jne 0x41aba3
cmp dword [0x4cc464], 1
je 0x41ac82
cmp ecx, 0xfc
je 0x41aca7
push 0x104
lea eax, [ebp - 0x10c]
push eax
push edx
mov byte [ebp - 8], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x41abdc
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.0040f630
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.0040e9a0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x41ac1e
lea eax, [ebp - 0x10c]
push eax
call fcn.0040e9a0
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x4add48
push edi
call fcn.0041f9f0
add esp, 0x10
push edi
call fcn.0040e9a0
push dword [esi + 0x4ccc94]
mov ebx, eax
call fcn.0040e9a0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040f3e0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040f630
push edi
push ebx
call fcn.0040f640
push 0x4ae328
push ebx
call fcn.0040f640
push dword [esi + 0x4ccc94]
push ebx
call fcn.0040f640
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00420426
add esp, 0x2c
jmp 0x41aca7
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x4ccc94]
push dword [esi]
call fcn.0040e9a0
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 - 0x118]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.0041087c
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41d308
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x41d4ce
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4d1c80]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x41d4ce
test cl, 0x48
je 0x41d36e
mov al, byte [eax + 5]
cmp al, 0xa
je 0x41d36e
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41d3c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x41d3a8
call fcn.00411c51
mov dword [eax], 9
call fcn.00411c5a
mov dword [eax], esi
jmp 0x41d3b8
cmp eax, 0x6d
je 0x41d4ce
push eax
call fcn.00411c63
pop ecx
or eax, 0xffffffff
jmp 0x41d4d0
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x41d4c9
test edx, edx
je 0x41d3e3
cmp byte [ebx], 0xa
jne 0x41d3e3
or al, 4
jmp 0x41d3e5
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x41d4c3
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x41d4b3
cmp al, 0xd
je 0x41d419
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x41d4a5
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x41d433
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x41d42e
add dword [ebp + 0x10], 2
jmp 0x41d487
mov dword [ebp + 0x10], eax
jmp 0x41d4a1
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41d45b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41d4a1
cmp dword [ebp - 0xc], 0
je 0x41d4a1
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x41d47c
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x41d487
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x41d4a4
cmp ebx, dword [ebp + 0xc]
jne 0x41d48c
cmp byte [ebp - 1], 0xa
jne 0x41d48c
mov byte [ebx], 0xa
jmp 0x41d4a4
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00414dfd
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x41d4a5
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x41d3fd
jmp 0x41d4c3
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x41d4c3
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x41d4d0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret