joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10012b78
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
sub esp, 0x44
call fcn.100122cc
mov ebx, 2
cmp dword [0x1002aac8], 0
je 0x10012ba5
mov eax, dword [esp + 0x50]
mov dword [esp], eax
call fcn.100132f4
mov ebx, 7
test eax, eax
jne 0x10012bb4
call fcn.10012322
mov eax, ebx
add esp, 0x44
pop ebx
pop esi
ret 0xc
mov eax, dword [esp + 0x54]
mov dword [esp], eax
call fcn.100132f4
test eax, eax
je 0x10012ba5
mov eax, dword [esp + 0x50]
call fcn.10012284
mov ebx, 3
cmp eax, 0xffffffff
jne 0x10012ba5
mov eax, dword [esp + 0x50]
mov dword [esp], eax
call fcn.100131ca
mov esi, eax
mov ebx, 9
test eax, eax
je 0x10012ba5
mov eax, dword [esp + 0x50]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], esi
lea eax, [esp + 0x1c]
mov dword [esp], eax
call fcn.10013399
test eax, eax
je 0x10012d79
mov edx, dword [0x1002ab34]
test edx, edx
je 0x10012ced
mov eax, dword [0x1002ab38]
cmp dword [0x1002ab3c], eax
jae 0x10012d2c
mov eax, dword [0x1002ab3c]
lea edx, [eax + 1]
mov dword [0x1002ab3c], edx
imul eax, eax, 0x2c
add eax, dword [0x1002ab34]
je 0x10012d8b
mov edx, dword [esp + 0x1c]
mov dword [eax], edx
mov edx, dword [esp + 0x20]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x24]
mov dword [eax + 8], edx
mov esi, dword [esp + 0x28]
mov ebx, esi
and ebx, 1
movzx ecx, byte [eax + 0x14]
and ecx, 0xfffffff8
or ecx, ebx
mov byte [eax + 0x14], cl
movzx ebx, byte [esp + 0x2c]
and ebx, 0xf
movzx ecx, byte [eax + 0x18]
and ecx, 0xfffffff0
or ecx, ebx
mov byte [eax + 0x18], cl
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x34]
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ebx
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
mov dword [eax + 0x24], ecx
mov dword [eax + 0x28], ebx
test esi, esi
je 0x10012d64
lea ecx, [eax + 0xc]
mov esi, dword [esp + 0x50]
lea ebx, [esi - 5]
mov esi, dword [esi - 5]
mov dword [eax + 0xc], esi
movzx eax, word [ebx + 4]
mov word [ecx + 4], ax
movzx eax, byte [ebx + 6]
mov byte [ecx + 6], al
mov ebx, 0
cmp dword [esp + 0x58], 0
je 0x10012ba5
mov eax, dword [esp + 0x58]
mov dword [eax], edx
jmp 0x10012ba5
mov dword [0x1002ab38], 0x20
mov dword [esp + 8], 0x580
mov dword [esp + 4], 0
mov eax, dword [0x1002aac8]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
sub esp, 0xc
mov dword [0x1002ab34], eax
test eax, eax
jne 0x10012c35
mov ebx, 9
jmp 0x10012d7e
imul eax, eax, 0x58
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov eax, dword [0x1002aac8]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
sub esp, 0x10
test eax, eax
je 0x10012d25
shl dword [0x1002ab38], 1
mov dword [0x1002ab34], eax
jmp 0x10012c35
mov esi, dword [esp + 0x50]
mov ecx, dword [esi]
mov dword [eax + 0xc], ecx
movzx ecx, byte [esi + 4]
mov byte [eax + 0x10], cl
jmp 0x10012cd2
mov ebx, 8
mov dword [esp], esi
call fcn.1001326e
jmp 0x10012ba5
mov ebx, 9
jmp 0x10012d7e
Function at 0x100131ca
Capabilities:
Allocate or change rwx memory

Disassembly:
mov edx, dword [0x1002ab40]
test edx, edx
je 0x100131f3
cmp dword [edx + 4], 0
jne 0x100131e6
mov edx, dword [edx]
test edx, edx
je 0x100131f3
cmp dword [edx + 4], 0
je 0x100131da
mov eax, dword [edx + 4]
mov ecx, dword [eax]
mov dword [edx + 4], ecx
add dword [edx + 8], 1
ret
push ebx
sub esp, 0x18
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0x3000
mov dword [esp + 4], 0x1000
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
sub esp, 0x10
mov edx, eax
mov eax, 0
test edx, edx
je 0x10013269
lea eax, [edx + 0x20]
mov dword [edx + 4], 0
mov dword [edx + 8], 0
lea ebx, [edx + 0x1000]
mov ecx, dword [edx + 4]
mov dword [eax], ecx
mov dword [edx + 4], eax
add eax, 0x20
cmp eax, ebx
jne 0x10013241
mov eax, dword [0x1002ab40]
mov dword [edx], eax
mov dword [0x1002ab40], edx
mov eax, dword [edx + 4]
mov ecx, dword [eax]
mov dword [edx + 4], ecx
add dword [edx + 8], 1
add esp, 0x18
pop ebx
ret

Function at 0x10013338
Capabilities:
Check for software breakpoints

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
mov edi, edx
movzx eax, byte [eax]
test al, al
setne cl
mov esi, ecx
cmp al, 0x90
setne cl
mov edx, esi
test dl, cl
je 0x1001335d
mov ecx, 0
cmp al, 0xcc
jne 0x10013385
cmp edi, 1
jbe 0x1001338b
cmp al, byte [ebx + 1]
jne 0x10013392
lea ecx, [ebx + 2]
lea edx, [edi + ebx]
cmp ecx, edx
je 0x10013380
add ecx, 1
cmp byte [ecx - 1], al
je 0x1001336d
mov ecx, 0
jmp 0x10013385
mov ecx, 1
mov eax, ecx
pop ebx
pop esi
pop edi
ret
mov ecx, 1
jmp 0x10013385
mov ecx, 0
jmp 0x10013385
Function at 0x10014103
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0x1002a884], 0
push ebx
push esi
mov esi, 0x1002a88c
jne 0x1001412f
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
mov dword [0x1002a8a4], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x1002a884], 1
push dword [0x1002a8a4]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x100141cc
push 0x14
push 8
push dword [0x100299b8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x100141f6
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x1002a888]
test eax, eax
je 0x10014171
mov dword [eax], ebx
push edi
push esi
mov dword [ebx + 4], eax
mov dword [0x1002a888], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edi, [ebx + 0x10]
push 0
push 0
push 0x100000
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 8
push 0xffffffffffffffff
push ebx
push 0x100141fb
push dword [edi]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push ebx
push dword [0x1002a8a4]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
push 0xc
push 0
push dword [0x100299b8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x100141f6
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 8], ecx
mov ecx, dword [ebx + 8]
mov dword [eax], ecx
mov dword [ebx + 8], eax
pop esi
pop ebx
ret 8
Function at 0x100158a8
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push ebp
push esi
push edi
push dword [0x1002ab20]
call fcn.10017148
mov edi, dword [eax + 0x24]
test edi, edi
je 0x10015966
cmp dword [edi + 8], 1
je 0x10015966
mov edi, dword [edi + 0xc]
test edi, edi
je 0x10015966
mov al, byte [edi]
cmp al, 0x20
je 0x100158e1
cmp al, 9
jne 0x100158e4
inc edi
jmp 0x100158d7
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor eax, eax
push eax
push eax
push 0xffffffffffffffff
push edi
push eax
push 0xfde9
call esi
push dword [esp + 0x14]
mov ebx, eax
lea ecx, [ebx - 1]
push ecx
call fcn.10018380
push ebx
mov ebp, eax
push ebp
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call esi
test ebx, ebx
jle 0x10015935
push 9
pop edx
lea eax, [ebp - 2]
lea eax, [eax + ebx*2]
movzx ecx, word [eax]
push 0x20
pop esi
cmp cx, si
je 0x10015951
cmp cx, dx
je 0x10015951
pop edi
pop esi
pop ebp
pop ebx
ret 4
movzx ecx, word [eax]
cmp cx, si
je 0x10015949
cmp cx, dx
jne 0x10015955
xor ecx, ecx
mov word [eax], cx
sub eax, 2
cmp eax, ebp
jae 0x1001593c
push ebp
call sub.MSVCRT.dll_wcslen
pop ecx
sub ebx, eax
push ebx
call fcn.10018460
jmp 0x10015935
pop edi
pop esi
pop ebp
pop ebx
jmp fcn.10018560
Function at 0x10015fac
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
cmp dword [ebp + 8], 0
je 0x10016024
push 0x104
push dword [ebp + 8]
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [ebp - 4], ax
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcslen
lea ecx, [ebp - 0x20c]
add esp, 0x10
lea eax, [ecx + eax*2]
jmp 0x10016005
movzx ecx, word [eax - 2]
cmp ecx, 0x20
je 0x10016002
cmp ecx, 0x5c
je 0x10016002
cmp ecx, 0x2f
jne 0x1001600f
add eax, 0xfffffffe
lea ecx, [ebp - 0x20c]
cmp eax, ecx
ja 0x10015fef
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x10016026
xor eax, eax
mov esp, ebp
pop ebp
ret 4

Function at 0x1001602c
Capabilities:
Get disk information
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x45c
push esi
or esi, 0xffffffff
push edi
mov edi, esi
test eax, eax
je 0x10016174
xor ecx, ecx
cmp word [eax], cx
je 0x10016174
push 0x104
push eax
lea eax, [esp + 0x10]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [esp + 0x21c], ax
lea eax, [esp + 0x14]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 0x10
lea ecx, [esp + eax*2 + 6]
cmp eax, 2
je 0x10016085
cmp eax, 3
jne 0x100160bf
cmp word [esp + 0xa], 0x3a
jne 0x100160bf
cmp eax, 2
jne 0x100160a3
lea eax, [esp + 8]
push 0x1001a050
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x10016174
push 0xfffffffffffffffe
pop edi
jmp 0x10016174
push ebx
push ebp
push 0x5c
pop ebp
push 0x2f
pop ebx
movzx eax, word [ecx]
cmp ax, bp
je 0x100160d4
cmp ax, bx
jne 0x100160de
xor eax, eax
mov word [ecx], ax
sub ecx, 2
jmp 0x100160c7
lea eax, [esp + 0x21c]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, esi
je 0x1001611d
test byte [esp + 0x21c], 0x10
je 0x10016104
push 0xfffffffffffffffe
pop edi
jmp 0x10016114
mov esi, dword [esp + 0x238]
xor edi, edi
or edi, dword [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x10016172
cmp word [esp + 0x10], bp
jne 0x1001612b
cmp word [esp + 0x12], bp
je 0x1001614a
cmp word [esp + 0x10], bx
jne 0x10016139
cmp word [esp + 0x12], bx
je 0x1001614a
push 0x2e
pop eax
cmp word [esp + 0x10], ax
jne 0x10016172
cmp word [esp + 0x12], ax
jne 0x10016172
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, esi
je 0x1001615f
test al, 0x10
je 0x10016172
jmp 0x1001616f
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x10016172
push 0xfffffffffffffffe
pop edi
pop ebp
pop ebx
mov eax, edi
mov edx, esi
pop edi
pop esi
add esp, 0x45c
ret 4
Function at 0x10016390
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x100163cc
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4

Function at 0x10016610
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push ebx
push dword [0x1002ab28]
mov dword [esp + 0x10], 0
call fcn.100172b9
mov ebp, eax
test ebp, ebp
je 0x1001676c
push esi
push edi
push ebx
call fcn.10016930
cmp dword [ebp + 4], 0
mov esi, eax
mov edi, edx
je 0x1001665c
push 4
lea eax, [esp + 0x1c]
push eax
push ebp
call fcn.100169a0
mov ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x10016677
push 0
lea eax, [esp + 0x14]
push eax
push 4
lea eax, [esp + 0x24]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x10]
cmp ecx, 2
jl 0x100166a5
lea edx, [esp + 0x18]
mov eax, 0xfeff
cmp word [edx], ax
jne 0x100166a5
add esi, 2
adc edi, 0
push edi
push esi
push ebx
call fcn.10016ac0
pop edi
pop esi
pop ebp
mov eax, 0x19
pop ebx
pop ecx
ret 4
cmp ecx, 3
jl 0x100166d6
lea edx, [esp + 0x18]
cmp word [edx], 0xbbef
jne 0x100166d6
cmp byte [edx + 2], 0xbf
jne 0x100166d6
add esi, 3
adc edi, 0
push edi
push esi
push ebx
call fcn.10016ac0
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
pop ecx
ret 4
cmp ecx, 2
jl 0x10016704
lea edx, [esp + 0x18]
mov eax, 0xfffe
cmp word [edx], ax
jne 0x10016704
add esi, 2
adc edi, 0
push edi
push esi
push ebx
call fcn.10016ac0
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
pop ecx
ret 4
cmp ecx, 4
jl 0x10016757
lea eax, [esp + 0x18]
cmp dword [eax], 0xfeff
jne 0x10016730
add esi, 4
adc edi, 0
push edi
push esi
push ebx
call fcn.10016ac0
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
pop ecx
ret 4
lea eax, [esp + 0x18]
cmp dword [eax], 0xfffe0000
jne 0x10016757
add esi, 4
adc edi, 0
push edi
push esi
push ebx
call fcn.10016ac0
pop edi
pop esi
pop ebp
mov eax, 6
pop ebx
pop ecx
ret 4
push edi
push esi
push ebx
call fcn.10016ac0
pop edi
pop esi
pop ebp
mov eax, 0x18
pop ebx
pop ecx
ret 4
pop ebp
mov eax, 0x18
pop ebx
pop ecx
ret 4
Function at 0x10016780
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push esi
push dword [esp + 0x10]
mov dword [esp + 8], 0
push dword [0x1002ab28]
call fcn.100172b9
mov esi, eax
test esi, esi
je 0x100167ff
cmp dword [esi + 4], 0
je 0x100167d0
push 1
lea eax, [esp + 8]
push eax
push esi
call fcn.100169a0
test eax, eax
je 0x100167c4
inc dword [esi + 0xc]
xor eax, eax
pop esi
add esp, 8
ret 4
mov eax, 1
pop esi
add esp, 8
ret 4
push 0
lea eax, [esp + 0xc]
push eax
push 1
lea eax, [esp + 0x1c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001680a
cmp dword [esp + 8], 0
je 0x1001680a
push 1
push 0
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret 4
or eax, 0xffffffff
pop esi
add esp, 8
ret 4

Function at 0x100169a0
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
cmp dword [esi + 0x14], 0
jne 0x100169c1
push esi
call fcn.10016390
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0x10]
cmp ebx, edi
jl 0x10016a35
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
dec ecx
je 0x10016a22
dec ecx
je 0x10016a0d
sub ecx, 2
je 0x100169fa
push edi
push eax
push dword [esp + 0x1c]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov eax, dword [esp + 0x14]
mov dword [eax], ecx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov cx, word [eax]
mov eax, dword [esp + 0x14]
mov word [eax], cx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
mov eax, edi
mov byte [ecx], dl
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
push ebp
mov ebp, dword [esp + 0x18]
sub eax, ebx
add eax, dword [esi + 4]
push ebx
push eax
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
push 0
cmp edi, eax
jl 0x10016a7a
lea eax, [esp + 0x18]
push eax
push edi
push ebp
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
add eax, ebx
pop esi
pop ebx
ret 0xc
lea ecx, [esp + 0x18]
push ecx
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
cmp edi, eax
jle 0x10016a9b
mov edi, eax
push edi
push dword [esi + 4]
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
lea eax, [ebx + edi]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x10016b30
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x100299b8]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x10016cb4
mov cl, byte [esp + 3]
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x10016b7e
test ebp, ebp
je 0x10016c20
dec ebp
cmp dword [ebx + 4], 0
je 0x10016b97
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.100169a0
mov dword [esp + 0x14], eax
jmp 0x10016bb1
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov cl, byte [esp + 0x13]
cmp eax, 1
jne 0x10016c20
test cl, cl
je 0x10016bc5
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x13]
mov eax, dword [esp + 0x18]
mov edi, esi
mov edx, dword [esp + 0x20]
dec eax
sub edi, edx
cmp edi, eax
jle 0x10016c00
mov eax, dword [esp + 0x18]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x100299b8]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x20], edx
lea esi, [edi + edx]
test cl, cl
je 0x10016c20
cmp dword [esp + 0x2c], 0
jne 0x10016b70
cmp cl, 0xd
je 0x10016c27
cmp cl, 0xa
jne 0x10016b70
dec esi
jmp 0x10016c97
cmp dword [esp + 0x2c], 0
jne 0x10016c97
cmp cl, 0xa
jne 0x10016c2f
dec esi
jmp 0x10016c97
cmp cl, 0xd
jne 0x10016c97
dec esi
cmp dword [ebx + 4], 0
je 0x10016c4e
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.100169a0
mov dword [esp + 0x14], eax
jmp 0x10016c64
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x10016c97
cmp dword [ebx + 4], 0
je 0x10016c76
inc dword [ebx + 0xc]
jmp 0x10016c97
push 1
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x20]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x10016cc0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push 0x1000
push 0
push dword [0x100299b8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov dword [esp + 8], ecx
test ecx, ecx
je 0x10016e6d
mov ax, word [esp]
push ebx
mov ebx, dword [esp + 0x20]
push ebp
mov ebp, dword [esp + 0x2c]
push esi
push edi
mov edi, ecx
mov dword [esp + 0x20], 0x1000
mov dword [esp + 0x1c], 0x7ff
cmp ebp, 0xffffffff
je 0x10016d14
test ebp, ebp
je 0x10016dcd
dec ebp
cmp dword [ebx + 4], 0
je 0x10016d2d
push 2
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.100169a0
mov dword [esp + 0x14], eax
jmp 0x10016d47
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
cmp eax, 2
mov ax, word [esp + 0x10]
jne 0x10016dcd
test ax, ax
je 0x10016d61
mov word [edi], ax
add edi, 2
mov ax, word [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov esi, edi
mov edx, dword [esp + 0x1c]
sub esi, ecx
sar esi, 1
cmp esi, edx
jle 0x10016da8
mov eax, dword [esp + 0x20]
add edx, 0x800
add eax, 0x1000
mov dword [esp + 0x1c], edx
push eax
push ecx
push 8
push dword [0x100299b8]
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, eax
mov ax, word [esp + 0x10]
mov dword [esp + 0x18], ecx
lea edi, [ecx + esi*2]
test ax, ax
je 0x10016dcd
cmp dword [esp + 0x30], 0
jne 0x10016d06
cmp ax, 0xd
je 0x10016dd4
cmp ax, 0xa
jne 0x10016d06
sub edi, 2
jmp 0x10016e4c
cmp dword [esp + 0x30], 0
jne 0x10016e4c
cmp ax, 0xa
jne 0x10016ddf
sub edi, 2
jmp 0x10016e4c
cmp ax, 0xd
jne 0x10016e4c
sub edi, 2
cmp dword [ebx + 4], 0
je 0x10016e01
push 2
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.100169a0
mov dword [esp + 0x14], eax
jmp 0x10016e17
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x10], 0xa
je 0x10016e4c
cmp dword [ebx + 4], 0
je 0x10016e2b
add dword [ebx + 0xc], 2
jmp 0x10016e4c
push 1
lea eax, [esp + 0x28]
mov dword [esp + 0x24], 0xfffffffe
push eax
push 0xfffffffffffffffe
push dword [ebx]
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x38]
mov ecx, edi
sub ecx, dword [esp + 0x18]
sar ecx, 1
mov dword [eax], ecx
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
xor eax, eax
add esp, 0x18
ret 0x10
Function at 0x10016e80
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x100299b8]
mov dword [esp + 0x10], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0xc], edx
test edx, edx
je 0x10016fd0
mov eax, dword [esp + 0x1c]
mov cl, byte [esp + 3]
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, edx
cmp edi, 0xffffffff
je 0x10016ecc
test edi, edi
je 0x10016f3d
dec edi
push esi
push ebp
call fcn.10016fe0
mov dword [esp + 0x20], eax
test eax, eax
jne 0x10016edf
xor cl, cl
jmp 0x10016ee1
mov cl, byte [esi]
mov edx, dword [esp + 0x1c]
add esi, eax
mov eax, dword [esp + 0x14]
mov ebx, esi
sub ebx, edx
mov byte [esp + 0x13], cl
add eax, 0xfffffffb
cmp ebx, eax
jle 0x10016f24
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x100299b8]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [ebx + edx]
mov eax, dword [esp + 0x2c]
test cl, cl
je 0x10016f3d
test eax, eax
jne 0x10016ec2
cmp cl, 0xd
je 0x10016f41
cmp cl, 0xa
jne 0x10016ec2
dec esi
jmp 0x10016fb3
test eax, eax
jne 0x10016fb3
cmp cl, 0xa
jne 0x10016f49
dec esi
jmp 0x10016fb3
cmp cl, 0xd
jne 0x10016fb3
dec esi
cmp dword [ebp + 4], 0
je 0x10016f68
push 1
lea eax, [esp + 0x17]
push eax
push ebp
call fcn.100169a0
mov dword [esp + 0x20], eax
jmp 0x10016f7f
push 0
lea eax, [esp + 0x24]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x10016fb3
cmp dword [ebp + 4], 0
je 0x10016f91
inc dword [ebp + 0xc]
jmp 0x10016fb3
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebp]
mov dword [esp + 0x28], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x1c]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10