Function at 0x100f0d70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x10251398
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov eax, dword [ebp + 8]
cmp dword [eax + 0x10], 0
jne 0x100f0da6
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
cmp dword [eax + 0x14], 8
mov dword [ebp + 8], 0
jb 0x100f0db5
mov eax, dword [eax]
push ebx
push 0
push 0x80
push 3
push 0
push 1
push accept
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x100f0de9
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
push esi
push edi
mov dword [ebp - 0x1c], ebx
push 0
lea eax, [ebp + 8]
mov dword [ebp - 4], 0
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push eax
push 2
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
push eax
push ebx
call esi
cmp dword [ebp + 8], 2
jne 0x100f0fec
push 0
lea eax, [ebp + 8]
mov dword [ebp - 0x24], 0
push eax
push 2
lea eax, [ebp - 0x24]
push eax
push ebx
call esi
cmp dword [ebp + 8], 2
jne 0x100f0fec
push 0
lea eax, [ebp + 8]
mov dword [ebp - 0x18], 0
push eax
push 2
lea eax, [ebp - 0x18]
push eax
push ebx
call esi
cmp dword [ebp + 8], 2
jne 0x100f0fec
mov eax, dword [ebp - 0x18]
cmp ax, 1
jb 0x100f0fec
movzx eax, ax
shl eax, 4
add eax, 8
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, dword [ebp + 0xc]
add esp, 4
mov cx, word [ebp - 0x20]
mov dword [ebp + 0xc], 0
mov dword [edi], eax
mov word [eax], cx
mov ecx, dword [edi]
movzx eax, word [ebp - 0x24]
mov word [ecx + 2], ax
mov ecx, dword [edi]
movzx eax, word [ebp - 0x18]
mov word [ecx + 4], ax
xor eax, eax
mov ecx, dword [edi]
cmp ax, word [ecx + 4]
jae 0x100f0ee3
xor esi, esi
nop
push 0
lea eax, [ebp + 8]
push eax
lea eax, [ecx + 8]
push 0x10
add eax, esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp + 8], 0x10
jne 0x100f0fe1
mov ecx, dword [edi]
add esi, 0x10
mov edx, dword [ebp + 0xc]
inc edx
mov dword [ebp + 0xc], edx
movzx eax, word [ecx + 4]
cmp edx, eax
jl 0x100f0eb0
movzx eax, word [ecx + 4]
mov edx, 4
xor ecx, ecx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1006e70d
mov edx, dword [edi]
mov esi, eax
xor eax, eax
mov dword [ebp + 0xc], esi
add esp, 4
xor ecx, ecx
cmp ax, word [edx + 4]
jae 0x100f0f23
mov dword [esi + ecx*4], 0
inc ecx
mov edx, dword [edi]
movzx eax, word [edx + 4]
cmp ecx, eax
jl 0x100f0f11
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x10], ecx
cmp ax, word [edx + 4]
jae 0x100f101c
xor esi, esi
mov dword [ebp - 0x1c], esi
nop dword [eax]
push dword [esi + edx + 0x10]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebp - 0x14], eax
test eax, eax
je 0x100f1016
mov ecx, dword [edi]
push 0
push 0
mov esi, dword [esi + ecx + 0x14]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, esi
jne 0x100f100a
mov eax, dword [edi]
mov esi, dword [ebp - 0x1c]
push 0
mov esi, dword [esi + eax + 0x10]
lea eax, [ebp + 8]
push eax
push esi
push dword [ebp - 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, dword [ebp + 8]
jne 0x100f100a
mov eax, dword [edi]
mov esi, dword [ebp - 0x1c]
push dword [esi + eax + 0x10]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x10]
mov dword [ecx + edx*4], eax
mov ecx, dword [edi]
push dword [esi + ecx + 0x10]
push dword [ebp - 0x14]
push eax
call sub.VCRUNTIME140.dll_memcpy
push dword [ebp - 0x14]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, dword [edi]
add esi, 0x10
mov ecx, dword [ebp - 0x10]
add esp, 0x14
inc ecx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x10], ecx
movzx eax, word [edx + 4]
cmp ecx, eax
jl 0x100f0f40
jmp 0x100f1019
push dword [edi]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
xor esi, esi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
push dword [ebp - 0x14]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov ecx, dword [ebp - 0x10]
mov esi, dword [ebp + 0xc]
mov eax, dword [edi]
movzx edx, word [eax + 4]
cmp ecx, edx
jge 0x100f0fee
xor eax, eax
xor esi, esi
cmp ax, dx
jae 0x100f1052
mov ecx, dword [ebp + 0xc]
movzx eax, si
mov eax, dword [ecx + eax*4]
test eax, eax
je 0x100f1049
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [ebp + 0xc]
add esp, 4
mov eax, dword [edi]
inc esi
cmp si, word [eax + 4]
jb 0x100f1032
push dword [ebp + 0xc]
call fcn.1006e708
push dword [edi]
xor esi, esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 8
jmp 0x100f0fee