joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10022170
Capabilities:
Set console window title

Disassembly:
push ebp
mov ebp, esp
call dword [sym.imp.KERNEL32.dll_AllocConsole]
push 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
push 0x1002a15c
push str.CONIN_
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_freopen]
add esp, 0xc
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
push 0x1002a168
push 0x1002a16c
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_freopen]
add esp, 0xc
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
push 0x1002a174
push str.CONOUT_
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_freopen]
add esp, 0xc
lea ecx, [ebp + 8]
call fcn.10006720
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
lea ecx, [ebp + 8]
call fcn.10003e50
nop
pop ebp
ret
Function at 0x10022a50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
cmp dword [eax + 0x38], 0
je 0x10022a7c
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 4]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
jmp 0x10022b63
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp - 4]
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pnavail_void_const]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], edx
cmp dword [ebp + 0x10], 0
jl 0x10022b14
jg 0x10022aa5
cmp dword [ebp + 0xc], 0
jbe 0x10022b14
cmp dword [ebp - 8], 0
jl 0x10022b14
jg 0x10022ab3
cmp dword [ebp - 0xc], 0
jbe 0x10022b14
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp - 8]
jg 0x10022ad1
jl 0x10022ac5
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp - 0xc]
jae 0x10022ad1
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 4]
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
push eax
call fcn.100040d0
add esp, 0xc
mov eax, dword [ebp - 0xc]
add eax, dword [ebp + 8]
mov dword [ebp + 8], eax
mov ecx, dword [ebp + 0xc]
sub ecx, dword [ebp - 0xc]
mov edx, dword [ebp + 0x10]
sbb edx, dword [ebp - 8]
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x10], edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 4]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pbump_int_]
nop
cmp dword [ebp + 0x10], 0
jl 0x10022b57
jg 0x10022b22
cmp dword [ebp + 0xc], 0
jbe 0x10022b57
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x4c], 0
je 0x10022b57
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x4c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 1
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
xor ecx, ecx
mov edx, dword [ebp + 0xc]
sub edx, eax
mov eax, dword [ebp + 0x10]
sbb eax, ecx
mov dword [ebp + 0xc], edx
mov dword [ebp + 0x10], eax
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x10]
sbb edx, dword [ebp + 0x10]
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10022b70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 8], ecx
cmp dword [ebp + 0x10], 0
jg 0x10022b90
jl 0x10022b87
cmp dword [ebp + 0xc], 0
ja 0x10022b90
xor eax, eax
xor edx, edx
jmp 0x10022cce
mov eax, dword [ebp - 8]
cmp dword [eax + 0x38], 0
je 0x10022bb3
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
jmp 0x10022cce
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Gnavail_void_const]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jbe 0x10022c26
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 4]
push edx
call fcn.100044d0
add esp, 8
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
push ecx
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gptr_void_const]
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.100040d0
add esp, 0xc
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0xc]
mov dword [ebp + 8], eax
mov ecx, dword [ebp - 4]
sub ecx, dword [ebp - 0xc]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0xc]
push edx
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gbump_int_]
nop
mov eax, dword [ebp - 8]
cmp dword [eax + 0x4c], 0
je 0x10022cbf
mov ecx, dword [ebp - 8]
call fcn.10023700
mov dword [ebp - 0x18], 0xfff
cmp dword [ebp - 4], 0xfff
jbe 0x10022c97
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x4c]
push edx
push 0xfff
push 1
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x10]
mov dword [ebp + 8], ecx
mov edx, dword [ebp - 4]
sub edx, dword [ebp - 0x10]
mov dword [ebp - 4], edx
cmp dword [ebp - 0x10], 0xfff
je 0x10022c95
xor eax, eax
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x1c]
sbb edx, eax
mov eax, ecx
jmp 0x10022cce
jmp 0x10022c42
cmp dword [ebp - 4], 0
jbe 0x10022cbf
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x4c]
push eax
mov ecx, dword [ebp - 4]
push ecx
push 1
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
mov ecx, dword [ebp - 4]
sub ecx, eax
mov dword [ebp - 4], ecx
xor edx, edx
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x1c]
sbb ecx, edx
mov edx, ecx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10023790
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x1002f040]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x38], 0
je 0x100237b7
mov ecx, dword [ebp - 0x2c]
movzx edx, byte [ecx + 0x3d]
test edx, edx
jne 0x100237be
mov al, 1
jmp 0x1002388f
call fcn.10004440
push eax
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [edx + 0xc]
call eax
push eax
call fcn.10004440
push eax
call fcn.10023b90
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x100237ee
xor al, al
jmp 0x1002388f
mov dword [ebp - 0x40], 0x20
lea edx, [ebp - 0x3c]
push edx
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x2c]
add edx, 0x40
push edx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x38]
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x1002382b
cmp dword [ebp - 0x30], 1
je 0x10023832
cmp dword [ebp - 0x30], 3
je 0x10023882
jmp 0x1002388d
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 0x3d], 0
mov edx, dword [ebp - 0x3c]
lea eax, [ebp - 0x28]
sub edx, eax
mov dword [ebp - 0x34], edx
je 0x10023862
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x4c]
push edx
mov eax, dword [ebp - 0x34]
push eax
push 1
lea ecx, [ebp - 0x28]
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp dword [ebp - 0x34], eax
je 0x10023862
xor al, al
jmp 0x1002388f
mov edx, dword [ebp - 0x2c]
movzx eax, byte [edx + 0x3d]
test eax, eax
jne 0x10023876
mov dword [ebp - 0x38], 1
jmp 0x1002387d
mov dword [ebp - 0x38], 0
mov al, byte [ebp - 0x38]
jmp 0x1002388f
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 0x3d], 0
mov al, 1
jmp 0x1002388f
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10024c0b
mov esp, ebp
pop ebp
ret

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

Disassembly:
pushal
nop
nop
nop
mov eax, section..rsrc
nop
mov ebx, 0x40c7d0
mov ecx, 0x51c658f4
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x43204e
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
cmp eax, ebx
nop
nop
nop
nop
nop
nop
nop
jne 0x432024
nop
mov eax, section..data
nop
mov ebx, 0x42f314
nop
nop
mov ecx, 0x2a43590
test eax, eax
nop
nop
nop
nop
nop
nop
nop
je 0x432084
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
add eax, 4
nop
nop
nop
cmp eax, ebx
nop
nop
jne 0x43206c
nop
nop
nop
nop
nop
nop
popal
nop
nop
nop
jmp 0x431219
Function at 0x10004290
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
push 0x1c
lea eax, [ebp - 0x24]
mov dword [ebp - 0x28], edx
push eax
mov edi, ecx
push edi
push dword [0x100274f0]
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
jne 0x100042dd
mov edx, str.Failed_to_query_virtual_memory.
mov ecx, str._V_PATCH__Error_while_writing_memory_
call fcn.10003950
xor al, al
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004713
mov esp, ebp
pop ebp
ret
push ebx
xor bl, bl
test byte [ebp - 0x10], 0x40
jne 0x10004325
lea eax, [ebp - 8]
mov bl, 1
push eax
push 0x40
push dword [ebp - 0x18]
push dword [ebp - 0x24]
push dword [0x100274f0]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x10004325
mov edx, str.Failed_to_change_memory_protection.
mov ecx, str._V_PATCH__Error_while_writing_memory_
call fcn.10003950
pop ebx
xor al, al
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004713
mov esp, ebp
pop ebp
ret
push dword [ebp + 8]
push dword [ebp - 0x28]
push edi
call fcn.100074d0
add esp, 0xc
test bl, bl
je 0x100043ab
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push dword [ebp - 0x18]
push dword [ebp - 0x24]
push dword [0x100274f0]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x10004376
mov edx, str.Failed_to_restore_memory_protection.
mov ecx, str._V_PATCH__Error_while_writing_memory_
call fcn.10003950
pop ebx
xor al, al
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004713
mov esp, ebp
pop ebp
ret
push dword [ebp + 8]
push edi
push dword [0x100274f0]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
test eax, eax
jne 0x100043ab
mov edx, str.Failed_to_flush_instruction_cache.
mov ecx, str._V_PATCH__Error_while_writing_memory_
call fcn.10003950
pop ebx
xor al, al
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004713
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
pop ebx
xor ecx, ebp
pop edi
call fcn.10004713
mov esp, ebp
pop ebp
ret
Function at 0x100043c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x1c
lea eax, [ebp - 0x24]
mov esi, ecx
push eax
push esi
push dword [0x100274f0]
mov edi, edx
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
jne 0x1000440e
mov edx, str.Failed_to_query_virtual_memory.
mov ecx, str._V_PATCH__Error_while_writing_NOP_to_memory_
call fcn.10003950
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004713
mov esp, ebp
pop ebp
ret
push ebx
xor bl, bl
test byte [ebp - 0x10], 0x40
jne 0x10004457
lea eax, [ebp - 8]
mov bl, 1
push eax
push 0x40
push dword [ebp - 0x18]
push dword [ebp - 0x24]
push dword [0x100274f0]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x10004457
mov edx, str.Failed_to_change_memory_protection.
mov ecx, str._V_PATCH__Error_while_writing_NOP_to_memory_
call fcn.10003950
pop ebx
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004713
mov esp, ebp
pop ebp
ret
push edi
push 0x90
push esi
call fcn.10006040
add esp, 0xc
test bl, bl
je 0x100044dd
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push dword [ebp - 0x18]
push dword [ebp - 0x24]
push dword [0x100274f0]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x100044a9
mov edx, str.Failed_to_restore_memory_protection.
mov ecx, str._V_PATCH__Error_while_writing_NOP_to_memory_
call fcn.10003950
pop ebx
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004713
mov esp, ebp
pop ebp
ret
push edi
push esi
push dword [0x100274f0]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
test eax, eax
jne 0x100044dd
mov edx, str.Failed_to_flush_instruction_cache.
mov ecx, str._V_PATCH__Error_while_writing_NOP_to_memory_
call fcn.10003950
pop ebx
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004713
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.10004713
mov esp, ebp
pop ebp
ret
Function at 0x10013146
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x100131e3
push ebx
push esi
call fcn.1001310f
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.10013058
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x10013190
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x100131e2
push edi
push eax
call fcn.10010b5b
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x100131b0
call fcn.1000ecb1
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x100131e1
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.10013058
add esp, 0x20
test eax, eax
jne 0x100131cf
push edi
call fcn.1000ecb1
jmp 0x100131d7
push ebx
call fcn.1000ecb1
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x1001344e
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1001ef70
push 0x1001ef68
push str.FlsAlloc
push 0x1e
call fcn.1001336c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10013482
push dword [ebp + 8]
mov ecx, esi
call dword [0x1001c154]
call esi
jmp 0x10013488
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x100134cc
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1001ef80
push 0x1001ef78
push str.FlsGetValue
push 0x20
call fcn.1001336c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10013503
push dword [ebp + 8]
mov ecx, esi
call dword [0x1001c154]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x10015402
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.10015273
Function at 0x10015853
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x10027020]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x10015893
cmp byte [ebx], 0xa
jne 0x10015893
or byte [eax + edi + 0x28], 4
jmp 0x10015898
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x10015996
mov al, byte [edx]
cmp al, 0x1a
je 0x10015978
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x100158c7
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x100158ec
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x100158f6
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x100158a9
jmp 0x10015996
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10015973
cmp dword [ebp - 0xc], 0
je 0x10015973
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x10027020]
test byte [eax + edi + 0x28], 0x48
je 0x1001594d
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x10015938
mov byte [esi], dl
jmp 0x10015949
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x10027020]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x10015996
cmp byte [ebp - 1], 0xa
jne 0x1001595c
cmp esi, ebx
jne 0x1001595c
mov byte [esi], 0xa
jmp 0x10015995
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1001564c
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x10015996
mov byte [esi], 0xd
jmp 0x10015995
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x10027020]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x10015992
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x10015996
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x1001599f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x10027020]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x100159e2
cmp word [esi], dx
jne 0x100159e2
or byte [edi + eax + 0x28], 4
jmp 0x100159e7
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x10015b3a
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x10015b1a
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x10015a29
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x10015a5f
cmp eax, edx
jae 0x10015a6b
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x10015a01
jmp 0x10015b3a
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10015b16
cmp dword [ebp - 0x14], 0
je 0x10015b16
mov eax, dword [ebx*4 + 0x10027020]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x10015aee
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x10015ab7
mov word [esi], cx
jmp 0x10015aea
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x10027020]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x10027020]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x10027020]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x10015b3a
pop ebx
cmp word [ebp - 4], bx
jne 0x10015aff
cmp esi, dword [ebp + 0xc]
jne 0x10015aff
mov word [esi], bx
jmp 0x10015b37
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.1001564c
add esp, 0x10
cmp word [ebp - 4], bx
je 0x10015b3a
push 0xd
jmp 0x10015b33
mov ecx, dword [ebx*4 + 0x10027020]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x10015b31
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x10015b3a
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x10018bd1
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10018b4d
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x10018d49
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x10018d49
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x10018cf8
jg 0x10018c2a
test eax, eax
je 0x10018cee
push 1
push 0x1000
call fcn.10011d48
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x10018c50
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x10018ce5
push 0x8000
push ebx
call fcn.10018a7e
mov edi, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x10018c7c
jg 0x10018c77
cmp ecx, 0x1000
jb 0x10018c7c
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.10010426
add esp, 0x10
cmp eax, 0xffffffff
je 0x10018cc1
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x10018c77
jl 0x10018ca8
test ecx, ecx
jne 0x10018c69
push dword [ebp - 0xc]
push ebx
call fcn.10018a7e
push esi
call fcn.1000ecb1
add esp, 0xc
xor edi, edi
jmp 0x10018d5a
cmp byte [edi + 0x24], 0
je 0x10018cd8
cmp dword [edi + 0x20], 5
jne 0x10018cd8
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x10018ce3
mov edi, dword [edi + 0x18]
jmp 0x10018ce5
xor edi, edi
push esi
call fcn.1000ecb1
pop ecx
jmp 0x10018d5a
test ecx, ecx
jg 0x10018cba
jl 0x10018cf8
test eax, eax
jae 0x10018cba
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.1001564c
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x10018d1b
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x10018cba
jmp 0x10018d52
push ebx
call fcn.100149b7
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x10018cba
mov esi, dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [esi + 0x24], 1
mov dword [esi + 0x20], eax
pop edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], edi
jmp 0x10018d5a
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x10018d57
mov edi, dword [edi + 0x18]
jmp 0x10018d5a
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.1001564c
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1001b300
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1001b32d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1001b32d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret