Function at 0x10007180
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x28
mov eax, dword [esp + 0x2c]
push ebx
push ebp
mov ebp, dword [esp + 0x38]
xor ebx, ebx
push esi
push ebx
push 1
push 3
push ebx
push 1
push 0x80000000
push eax
mov byte [ebp + 0x1c], bl
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x1000741a
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [esp + 0x34], ebx
mov dword [esp + 0x18], ebx
lea ecx, [esp + 0x40]
push ebx
push ecx
lea edx, [esp + 0x24]
push 4
push edx
push esi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
call edi
test eax, eax
je 0x100073fb
cmp dword [esp + 0x40], 4
jne 0x100073fb
lea eax, [esp + 0x40]
push ebx
push eax
lea ecx, [esp + 0x44]
push 4
push ecx
push esi
call edi
test eax, eax
je 0x100073fb
cmp dword [esp + 0x40], 4
jne 0x100073fb
mov edx, dword [esp + 0x3c]
push edx
call fcn.10007140
add esp, 4
cmp eax, ebx
mov dword [esp + 0x3c], eax
je 0x100073fb
mov edx, dword [esp + 0x18]
add edx, eax
mov eax, dword [esp + 0x1c]
cmp eax, 0x504f5250
mov dword [esp + 0x18], edx
je 0x1000730b
cmp eax, 0x544e4f43
jne 0x100073e4
lea eax, [esp + 0x40]
push ebx
push eax
lea ecx, [esp + 0x28]
push 2
push ecx
push esi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call edi
cmp word [esp + 0x20], bx
jne 0x100073e4
lea edx, [esp + 0x40]
push ebx
push edx
lea eax, [esp + 0x18]
push 2
push eax
push esi
call edi
mov ecx, dword [esp + 0x10]
push ecx
call fcn.10007170
add esp, 4
cmp ax, bx
mov dword [esp + 0x10], eax
jbe 0x100072ba
cmp ax, word [ebp + 4]
jae 0x100072ba
lea edx, [esp + 0x40]
push ebx
and eax, 0xffff
push edx
push eax
mov eax, dword [ebp]
push eax
push esi
call edi
or byte [ebp + 0x1c], 1
lea ecx, [esp + 0x40]
push ebx
push ecx
lea edx, [esp + 0x1c]
push 2
push edx
push esi
call edi
mov eax, dword [esp + 0x14]
push eax
call fcn.10007170
add esp, 4
cmp ax, bx
mov dword [esp + 0x14], eax
jbe 0x100073e4
cmp ax, word [ebp + 0xc]
jae 0x100073e4
mov edx, dword [ebp + 8]
lea ecx, [esp + 0x40]
push ebx
and eax, 0xffff
push ecx
push eax
push edx
push esi
call edi
mov al, byte [ebp + 0x1c]
or al, 2
jmp 0x100073e1
lea eax, [esp + 0x40]
push ebx
push eax
lea ecx, [esp + 0x28]
push 2
push ecx
push esi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x24], ebx
call edi
cmp word [esp + 0x20], bx
jne 0x100073e4
lea edx, [esp + 0x40]
push ebx
push edx
lea eax, [esp + 0x2c]
push 4
push eax
push esi
call edi
lea ecx, [esp + 0x40]
push ebx
push ecx
lea edx, [esp + 0x1c]
push 4
push edx
push esi
call edi
mov eax, dword [esp + 0x14]
push eax
call fcn.10007140
mov dl, byte [ebp + 0x1c]
add esp, 4
or dl, 0x10
lea ecx, [esp + 0x40]
mov byte [ebp + 0x1c], dl
push ebx
push ecx
lea edx, [esp + 0x30]
push 4
push edx
push esi
mov dword [esp + 0x28], eax
mov dword [ebp + 0x18], eax
call edi
lea eax, [esp + 0x40]
push ebx
push eax
lea ecx, [esp + 0x34]
push 4
push ecx
push esi
call edi
lea edx, [esp + 0x40]
push ebx
push edx
lea eax, [esp + 0x38]
push 4
push eax
push esi
call edi
lea ecx, [esp + 0x40]
push ebx
push ecx
lea edx, [esp + 0x18]
push 4
push edx
push esi
call edi
mov eax, dword [esp + 0x10]
push eax
call fcn.10007140
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov al, byte [ebp + 0x1c]
add esp, 4
shr edx, 6
mov word [ebp + 0x16], dx
or al, 8
mov byte [ebp + 0x1c], al
mov ecx, dword [esp + 0x18]
push ebx
push ebx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x100071c1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp + 0x1c]
pop edi
cmp al, bl
mov eax, 1
jne 0x1000741c
mov eax, dword [esp + 0x30]
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
xor eax, eax
pop esi
pop ebp
pop ebx
add esp, 0x28
ret