Function at 0x1000c8d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push edi
mov edi, dword [ebp + 8]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x1000c912
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
mov esp, ebp
pop ebp
ret 4
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [ebp - 8]
push ecx
push 4
lea ecx, [ebp + 8]
push ecx
push eax
mov dword [ebp + 8], 0
mov dword [ebp - 8], 0
call esi
test eax, eax
je 0x1000cac3
mov eax, dword [ebp + 8]
cmp eax, 0x186a0
jae 0x1000caaa
push 4
push 0x1000
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
test ebx, ebx
je 0x1000cac3
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
push ebx
push dword [ebp - 0x10]
call esi
test eax, eax
je 0x1000ca83
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 8]
jne 0x1000ca83
push eax
push ebx
call fcn.1000c210
mov ecx, dword [ebp - 0xc]
add esp, 8
call fcn.1000c1c0
push 4
push ebx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1000ca1a
jmp 0x1000c9b0
mov eax, dword [esi + ebx]
add esi, 4
mov dword [ebp - 0x18], eax
cmp esi, dword [ebp + 8]
jae 0x1000ca21
cmp eax, 0x18
je 0x1000ca21
lea eax, [esi + ebx]
push 4
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1000ca1a
mov eax, dword [esi + ebx]
add esi, 4
mov dword [ebp - 0x14], eax
cmp esi, dword [ebp + 8]
jae 0x1000ca21
lea ecx, [esi + ebx]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1000ca1a
mov ecx, dword [ebp - 0xc]
lea eax, [esi + ebx]
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x18]
call fcn.1000cf60
add esi, dword [ebp - 0x14]
cmp esi, dword [ebp + 8]
jae 0x1000ca21
push 4
lea eax, [esi + ebx]
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x1000c9b0
mov dword [ebp - 4], 0x3ee
push 0x8000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 4]
test esi, esi
jne 0x1000cad4
mov ebx, dword [ebp - 0xc]
lea ecx, [ebx + 0xc]
mov edx, ecx
sub edx, edi
lea ecx, [ecx]
movzx eax, word [edi]
mov word [edx + edi], ax
lea edi, [edi + 2]
test ax, ax
jne 0x1000ca50
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1000ca62
sub ecx, edx
sar ecx, 1
inc ecx
mov eax, esi
pop esi
mov dword [ebx + 0x214], ecx
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 4
push 0x8000
push 0
push ebx
mov esi, 0x3ee
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 4
push dword [ebp - 0x10]
mov esi, 0x3ee
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x10]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 4