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

Disassembly:
sub esp, 0x30
mov eax, dword [0x4d900c]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebx
mov ebx, dword [esp + 0x38]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x4b5ba0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004c8789
add esp, 0x30
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x4b5bd1
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x4b5bd1
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
pop esi
mov byte [eax], bl
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004c8789
add esp, 0x30
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x4b5cb7
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x4b5bfa
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4b5c06
movsx eax, bl
jmp 0x4b5c46
lea eax, [esp + 0xc]
mov byte [esp + 0x17], bl
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x2b]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x4b5c71
sub eax, 1
je 0x4b5c71
sub eax, 2
jne 0x4b5cb7
movsx eax, byte [esp + 0x17]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004c8789
add esp, 0x30
ret 4
mov edi, dword [esp + 0xc]
lea eax, [esp + 0x18]
sub edi, eax
je 0x4b5c91
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x4b5cb7
lea ecx, [esp + 0x17]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [esp + 0x10], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004c8789
add esp, 0x30
ret 4
mov ecx, dword [esp + 0x38]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004c8789
add esp, 0x30
ret 4
Function at 0x4b6320
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x28
mov eax, dword [0x4d900c]
xor eax, esp
mov dword [esp + 0x24], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x4b63e2
cmp byte [esi + 0x3d], 0
je 0x4b63e2
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x4b63cf
mov ecx, dword [esi + 0x38]
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x4b6393
sub eax, 1
je 0x4b6397
sub eax, 2
jne 0x4b63cf
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.004c8789
add esp, 0x28
ret
mov byte [esi + 0x3d], 0
mov edi, dword [esp + 8]
lea eax, [esp + 0xc]
sub edi, eax
je 0x4b63b7
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x4b63cf
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.004c8789
add esp, 0x28
ret
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.004c8789
add esp, 0x28
ret
mov ecx, dword [esp + 0x28]
mov al, 1
pop esi
xor ecx, esp
call fcn.004c8789
add esp, 0x28
ret

Function at 0x4b7740
Capabilities:
Create thread

Disassembly:
push esi
push edi
push 4
mov esi, ecx
call fcn.004c879c
mov edx, dword [esp + 0x10]
lea edi, [esi + 4]
push edi
push 0
push eax
push 0x4b7810
push 0
push 0
mov dword [eax], edx
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x1c
mov dword [esi], eax
test eax, eax
jne 0x4b777a
push 6
mov dword [edi], eax
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
pop edi
pop esi
ret 4
Function at 0x4c0160
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
sub esp, 0xc
mov edx, dword [esp + 0x20]
xorps xmm0, xmm0
push ebx
mov ebx, ecx
mov dword [esp + 0xc], edx
push ebp
xor eax, eax
push esi
movups xmmword [ebx], xmm0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 7
mov word [ebx], ax
push edi
test edx, edx
jne 0x4c0197
mov dword [ebx + 0x10], edx
mov word [ebx + edx*2], ax
jmp 0x4c01c6
cmp edx, 7
ja 0x4c01b6
xor eax, eax
mov dword [ebx + 0x10], edx
mov ecx, edx
mov edi, ebx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
xor eax, eax
mov word [ebx + edx*2], ax
jmp 0x4c01c6
push ecx
push edx
mov byte [esp + 0x1c], al
push dword [esp + 0x1c]
push edx
call fcn.004c4da0
mov ebp, dword [0x4d986c]
xor edi, edi
mov eax, dword [ebp + 0x3c]
mov eax, dword [eax + ebp + 0x78]
add eax, ebp
mov dword [esp + 0x14], eax
mov esi, dword [eax + 0x20]
add esi, ebp
mov eax, dword [esi]
mov edx, 0xdf473955
add eax, ebp
mov cl, byte [eax]
inc eax
test cl, cl
je 0x4c020d
movsx ecx, cl
lea eax, [eax + 1]
xor ecx, edx
imul edx, ecx, 0x1000193
mov cl, byte [eax - 1]
test cl, cl
jne 0x4c01f0
cmp edx, 0xa6c82452
je 0x4c0213
inc edi
add esi, 4
jmp 0x4c01e0
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 0x24]
lea eax, [eax + edi*2]
movzx ecx, word [eax + ebp]
mov eax, dword [edx + 0x1c]
lea eax, [eax + ecx*4]
mov ecx, ebx
mov edx, dword [eax + ebp]
add edx, ebp
cmp dword [ebx + 0x14], 8
jb 0x4c0236
mov ecx, dword [ebx]
push dword [esp + 0x18]
cmp dword [esp + 0x38], 0x10
lea eax, [esp + 0x24]
push ecx
cmovae eax, dword [esp + 0x28]
push 0xffffffffffffffff
push eax
push 0
push 0
call edx
mov ecx, dword [esp + 0x34]
cmp ecx, 0x10
jb 0x4c028a
mov edx, dword [esp + 0x20]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4c0280
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4c0280
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.004c8a1d
add esp, 8
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0xc
ret
Function at 0x4c1e70
Capabilities:
Encode data using xor
Hash data using fnv
Resolve function by parsing pe exports

Disassembly:
push ecx
push ebx
mov ebx, dword [0x4d986c]
push ebp
push esi
push edi
mov eax, dword [ebx + 0x3c]
xor edi, edi
mov ebp, dword [eax + ebx + 0x78]
mov esi, dword [ebp + ebx + 0x20]
add esi, ebx
nop word [eax + eax]
mov ecx, dword [esi]
mov edx, 0xb80ad6d2
add ecx, ebx
mov al, byte [ecx]
inc ecx
test al, al
je 0x4c1ebd
movsx eax, al
lea ecx, [ecx + 1]
xor eax, edx
imul edx, eax, 0x1000193
mov al, byte [ecx - 1]
test al, al
jne 0x4c1ea0
cmp edx, 0x4fe74f3e
je 0x4c1ec3
inc edi
add esi, 4
jmp 0x4c1e90
mov eax, dword [ebp + ebx + 0x24]
lea eax, [eax + edi*2]
movzx ecx, word [eax + ebx]
mov eax, dword [ebp + ebx + 0x1c]
lea eax, [eax + ecx*4]
mov ecx, dword [eax + ebx]
mov eax, 0x4d90e0
add ecx, ebx
cmp dword [0x4d90f4], 8
cmovae eax, dword [0x4d90e0]
push eax
push 1
push 0
call ecx
mov ebx, dword [0x4d986c]
xor edi, edi
mov dword [0x4d9874], eax
mov ecx, dword [ebx + 0x3c]
mov ebp, dword [ecx + ebx + 0x78]
mov esi, dword [ebp + ebx + 0x20]
add esi, ebx
nop
mov ecx, dword [esi]
mov edx, 0xa8490ab2
add ecx, ebx
mov al, byte [ecx]
inc ecx
test al, al
je 0x4c1f3d
movsx eax, al
lea ecx, [ecx + 1]
xor eax, edx
imul edx, eax, 0x1000193
mov al, byte [ecx - 1]
test al, al
jne 0x4c1f20
cmp edx, 0xf027b001
je 0x4c1f43
inc edi
add esi, 4
jmp 0x4c1f10
mov eax, dword [ebp + ebx + 0x24]
push 0
push dword [0x4d9874]
lea eax, [eax + edi*2]
movzx ecx, word [eax + ebx]
mov eax, dword [ebp + ebx + 0x1c]
lea eax, [eax + ecx*4]
mov eax, dword [eax + ebx]
add eax, ebx
call eax
test eax, eax
je 0x4c1fd1
mov edi, dword [0x4d987c]
xor ebx, ebx
mov eax, dword [edi + 0x3c]
mov ebp, dword [eax + edi + 0x78]
mov esi, dword [ebp + edi + 0x20]
add esi, edi
nop dword [eax]
mov eax, dword [esi]
mov edx, 0x305c4b53
add eax, edi
mov cl, byte [eax]
inc eax
test cl, cl
je 0x4c1fad
movsx ecx, cl
lea eax, [eax + 1]
xor ecx, edx
imul edx, ecx, 0x1000193
mov cl, byte [eax - 1]
test cl, cl
jne 0x4c1f90
cmp edx, 0x7461af4
je 0x4c1fb3
inc ebx
add esi, 4
jmp 0x4c1f80
mov eax, dword [ebp + edi + 0x24]
push 1
lea eax, [eax + ebx*2]
movzx ecx, word [eax + edi]
mov eax, dword [ebp + edi + 0x1c]
lea eax, [eax + ecx*4]
mov eax, dword [eax + edi]
add eax, edi
call eax
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x4c922e
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4c926d
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4c926d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4c926d
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4c926d
cmp dword [ecx + 0x74], 0xe
jbe 0x4c926d
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x401318
Capabilities:
Allocate or change rwx memory
Encode data using xor
Execute shellcode via indirect call

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
mov eax, 0x5818
call fcn.004019ec
call fcn.004017e0
lea ebx, [ebp - 0x580c]
mov esi, 0x403040
mov ecx, 0x15fd
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
call sub.KERNEL32.dll_FreeConsole
mov esi, dword [ebp - 0x618]
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0x1000
mov dword [esp + 4], 0x57f4
mov dword [esp], 0
call sub.KERNEL32.dll_VirtualAlloc
sub esp, 0x10
mov edi, eax
xor ecx, ecx
nop
mov edx, edi
mov al, byte [ebx + ecx]
mov byte [edi + ecx], al
inc ecx
cmp ecx, 0x57f4
jne 0x401384
lea ecx, [edi + 0x51f4]
nop
xor dword [edx], esi
add esi, 0x499602d2
add edx, 4
cmp edx, ecx
jne 0x40139c
call edi
xor eax, eax
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
leave
lea esp, [ecx - 4]
ret

Function at 0x4014d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
test ecx, ecx
mov dword [ebp - 0xc], ebx
mov ebx, eax
mov dword [ebp - 8], esi
mov esi, edx
mov dword [ebp - 4], edi
mov edi, ecx
jne 0x4014f6
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x38]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.KERNEL32.dll_VirtualQuery
sub esp, 0xc
test eax, eax
je 0x40158a
mov eax, dword [ebp - 0x24]
cmp eax, 4
je 0x401545
cmp eax, 0x40
je 0x401545
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x24]
cmp eax, 4
je 0x4014e9
cmp eax, 0x40
je 0x4014e9
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
jmp 0x4014e9
mov dword [esp + 8], 0x34
mov dword [esp + 4], str..._.._runtime_pseudo_reloc.c
mov dword [esp], str.VirtualQuery__addr__b__sizeof_b__
call sub.msvcrt.dll__assert
lea esi, [esi]
lea edi, [edi]
Function at 0x402f48
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x40a3d8
call fcn.004032d4
mov edi, 0x94
mov eax, edi
call fcn.004060b0
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 [0x40c86c], ecx
mov eax, dword [esi + 4]
mov dword [0x40c878], eax
mov edx, dword [esi + 8]
mov dword [0x40c87c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40c870], esi
cmp ecx, 2
je 0x402fa8
or esi, 0x8000
mov dword [0x40c870], esi
shl eax, 8
add eax, edx
mov dword [0x40c874], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x402fe3
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x402fe3
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x402ffb
cmp eax, 0x20b
je 0x402fe8
mov dword [ebp - 0x1c], esi
jmp 0x40300f
cmp dword [ecx + 0x84], 0xe
jbe 0x402fe3
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x403009
cmp dword [ecx + 0x74], 0xe
jbe 0x402fe3
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040605a
pop ecx
test eax, eax
jne 0x40303b
cmp dword [0x40c858], 1
jne 0x403028
call fcn.0040580f
push 0x1c
call fcn.00405698
push 0xff
call fcn.00403f29
pop ecx
pop ecx
call fcn.00405fb8
mov dword [ebp - 4], esi
call fcn.00405e0d
test eax, eax
jge 0x403054
push 0x1b
call fcn.00402f23
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40de14], eax
call fcn.00405ceb
mov dword [0x40c850], eax
call fcn.00405c49
test eax, eax
jge 0x40307a
push 8
call fcn.00402f23
pop ecx
call fcn.00405a16
test eax, eax
jge 0x40308b
push 9
call fcn.00402f23
pop ecx
push 1
call fcn.00403f59
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4030a1
push eax
call fcn.00402f23
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.004059b9
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4030c2
movzx eax, word [ebp - 0x40]
jmp 0x4030c5
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401b90
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4030e3
push edi
call fcn.00404084
call fcn.004040a6
jmp 0x403115
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040330f
ret
Function at 0x403fc3
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40c8ac], esi
push edi
jne 0x403fe3
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 [0x40c8a8], esi
mov byte [0x40c8a4], al
jne 0x404049
mov ecx, dword [0x40de08]
test ecx, ecx
je 0x40402a
mov eax, dword [0x40de04]
sub eax, 4
cmp eax, ecx
jmp 0x404023
mov eax, dword [eax]
test eax, eax
je 0x404015
call eax
mov eax, dword [0x40de04]
sub eax, 4
cmp eax, dword [0x40de08]
mov dword [0x40de04], eax
jae 0x40400d
mov eax, 0x40c028
mov esi, 0x40c030
cmp eax, esi
mov edi, eax
jae 0x404049
mov eax, dword [edi]
test eax, eax
je 0x404042
call eax
add edi, 4
cmp edi, esi
jb 0x40403a
mov eax, 0x40c034
mov esi, 0x40c03c
cmp eax, esi
mov edi, eax
jae 0x404068
mov eax, dword [edi]
test eax, eax
je 0x404061
call eax
add edi, 4
cmp edi, esi
jb 0x404059
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x404082
push dword [ebp + 8]
mov dword [0x40c8ac], 1
call fcn.00403f29
pop ebp
ret
Function at 0x4043a4
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x40dcec]
mov eax, dword [0x40c040]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x40456a
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x40dd00]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x40456a
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x40440e
xor eax, eax
jmp 0x40457e
test al, 0x20
je 0x40441f
push 2
push edi
push edi
push ecx
call fcn.00407743
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x4044f4
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x40453b
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x404481
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x404472
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x404454
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4044c1
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x4044cd
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x404448
jmp 0x4044cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x404565
cmp dword [ebp + 0x3a4], edi
je 0x40453b
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x40452d
mov dword [0x40c864], eax
jmp 0x404571
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40451f
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x4044cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x4044cf
push dword [ebp + 0x3a4]
call fcn.004074c3
pop ecx
jmp 0x40457b
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x404553
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x404407
mov dword [0x40c860], 0x1c
mov dword [0x40c864], edi
jmp 0x40457b
sub eax, dword [ebp - 0x7c]
jmp 0x40457e
and dword [0x40c864], 0
mov dword [0x40c860], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00402673
add ebp, 0x39c
leave
ret
Function at 0x4054aa
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x40dcec]
push edi
jae 0x40567f
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x40dd00]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x40567f
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x405555
test dl, 2
jne 0x405555
test dl, 0x48
je 0x40551f
cmp byte [eax + 5], 0xa
je 0x40551f
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405568
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x405550
mov dword [0x40c864], ecx
jmp 0x405686
cmp eax, 0x6d
jne 0x40555c
xor eax, eax
jmp 0x405693
push eax
call fcn.004074c3
pop ecx
jmp 0x405690
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x40567a
test eax, eax
je 0x40558f
cmp byte [ebx], 0xa
jne 0x40558f
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x405598
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x405674
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x405664
cmp al, 0xd
je 0x4055ca
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x405656
dec ecx
cmp dword [ebp - 8], ecx
jae 0x4055e4
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x4055df
add dword [ebp - 8], 2
jmp 0x405638
mov dword [ebp - 8], eax
jmp 0x405652
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
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 0x40560c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x405652
cmp dword [ebp - 0x10], 0
je 0x405652
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40562d
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x405638
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x405655
cmp ebx, dword [ebp + 0xc]
jne 0x40563d
cmp byte [ebp - 1], 0xa
jne 0x40563d
mov byte [ebx], 0xa
jmp 0x405655
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004066d4
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x405656
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x4055ae
jmp 0x405674
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x405674
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x405693
and dword [0x40c864], 0
mov dword [0x40c860], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405698
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x40c040]
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 + 0x40c080]
je 0x4056cd
inc eax
cmp eax, 0x13
jb 0x4056be
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40c080]
jne 0x4057f3
mov eax, dword [0x40c858]
cmp eax, 1
je 0x4057cb
cmp eax, edx
jne 0x4056fd
cmp dword [0x40c058], 1
je 0x4057cb
cmp ecx, 0xfc
je 0x4057f3
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 0x405733
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.004061f0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00406420
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x405767
mov eax, edi
push eax
call fcn.00406420
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40a41c
push edi
call fcn.004062f0
add esp, 0x10
push edi
call fcn.00406420
push dword [esi + 0x40c084]
mov ebx, eax
call fcn.00406420
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004060b0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.004061f0
push edi
push ebx
call fcn.00406200
push 0x40a418
push ebx
call fcn.00406200
push dword [esi + 0x40c084]
push ebx
call fcn.00406200
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.004060ed
add esp, 0x2c
jmp 0x4057f3
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40c084]
push dword [esi]
call fcn.00406420
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.00402673
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret