Function at 0x30013490
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x3021ae88]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x7c], ecx
mov dword [ebp - 0x78], esi
mov edi, dword [esi + 0x2c]
mov byte [ebp - 0x71], 1
mov dword [esi + 0x28], 0
test edi, edi
jne 0x300134c4
mov edi, dword [esi + 0x30]
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x300136f4
test edi, edi
je 0x300136f4
cmp edi, 0x64
ja 0x30013569
cmp byte [ebp + 0x10], 0
mov dword [esi + 0x2c], edi
mov dword [esi + 0x30], edi
push edi
je 0x30013519
call fcn.3015e392
mov edx, dword [esi + 0x2c]
add esp, 4
mov ecx, ebx
mov dword [esi + 0x28], eax
push eax
call fcn.30015310
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.3015dd6d
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebp - 0x78], 0
call fcn.3015e392
add esp, 4
mov dword [esi + 0x28], eax
push 0
push 0
push ebx
mov ebx, dword [ebp - 0x7c]
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x78]
push 0
push eax
push dword [esi + 0x2c]
push dword [esi + 0x28]
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.3015dd6d
mov esp, ebp
pop ebp
ret 0xc
mov eax, 0x51eb851f
mov ebx, edi
mul edi
shr edx, 5
imul eax, edx, 0x64
sub ebx, eax
jne 0x30013581
mov ebx, 0x64
sub edi, ebx
add edi, dword [ebp + 8]
mov ecx, edi
call fcn.300028c0
test eax, eax
jne 0x300135a6
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.3015dd6d
mov esp, ebp
pop ebp
ret 0xc
cmp edi, dword [ebp + 8]
jb 0x30013670
nop
push ebx
lea eax, [ebp - 0x70]
push 0
push eax
call fcn.30160f00
mov cl, byte [ebp + 0x10]
add esp, 0xc
test cl, cl
je 0x300135e5
lea eax, [ebp - 0x70]
mov edx, ebx
push eax
mov ecx, edi
call fcn.30015310
mov cl, al
add esp, 4
mov byte [ebp - 0x71], cl
test cl, cl
je 0x3001366d
jmp 0x3001363d
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x84], 0
mov eax, dword [eax + 0x3c]
mov dword [ebp - 0x80], eax
cmp eax, 0xffffffff
je 0x300136d1
push 0
push 0
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0xffffffff
jne 0x3001361e
test eax, eax
jne 0x30013669
push 0
lea eax, [ebp - 0x84]
push eax
push ebx
lea eax, [ebp - 0x70]
push eax
push dword [ebp - 0x80]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x30013669
mov byte [ebp - 0x71], 1
lea eax, [ebx - 1]
test eax, eax
js 0x30013657
cmp byte [ebp + eax - 0x70], 0
jne 0x30013652
sub eax, 1
jns 0x30013644
jmp 0x30013657
add eax, 1
jne 0x300136b1
mov ebx, 0x64
sub edi, ebx
cmp edi, dword [ebp + 8]
jae 0x300135b0
jmp 0x3001366d
mov byte [ebp - 0x71], 0
mov esi, dword [ebp - 0x78]
mov ebx, dword [ebp + 8]
mov cl, byte [ebp + 0x10]
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x300136de
push eax
test cl, cl
jne 0x300134ed
mov dword [ebp - 0x80], 0
call fcn.3015e392
add esp, 4
mov dword [esi + 0x28], eax
push 0
push 0
push ebx
mov ebx, dword [ebp - 0x7c]
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x80]
jmp 0x3001353f
mov ebx, dword [ebp + 8]
add edi, eax
mov esi, dword [ebp - 0x78]
cmp ebx, edi
jae 0x30013673
mov ecx, dword [esi + 0x30]
sub edi, ebx
lea eax, [edi + 4]
mov dword [esi + 0x2c], eax
cmp ecx, eax
jae 0x30013673
mov dword [esi + 0x2c], ecx
jmp 0x30013673
mov esi, dword [ebp - 0x78]
xor al, al
mov ebx, dword [ebp + 8]
mov byte [ebp - 0x71], al
jmp 0x30013676
mov al, byte [ebp - 0x71]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.3015dd6d
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.3015dd6d
mov esp, ebp
pop ebp
ret 0xc