Function at 0x30013a60
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x30215e88]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x70], esi
mov edi, dword [esi + 0x2c]
mov byte [ebp - 0x69], 1
mov dword [esi + 0x28], 0
test edi, edi
jne 0x30013a91
mov edi, dword [esi + 0x30]
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x30013cc0
test edi, edi
je 0x30013cc0
cmp edi, 0x64
ja 0x30013b33
cmp byte [ebp + 0x10], 0
mov dword [esi + 0x2c], edi
mov dword [esi + 0x30], edi
push edi
je 0x30013ae3
call fcn.3015a252
mov edx, dword [esi + 0x2c]
mov ecx, ebx
push eax
mov dword [esi + 0x28], eax
call fcn.300158e0
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.30159c2d
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebp - 0x70], 0
call fcn.3015a252
add esp, 4
mov dword [esi + 0x28], eax
push 0
push 0
push ebx
mov ebx, dword [ebp - 0x74]
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x70]
push 0
push eax
push dword [esi + 0x2c]
push dword [esi + 0x28]
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
pop edi
test eax, eax
pop esi
setne al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.30159c2d
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 0x30013b4b
mov ebx, 0x64
sub edi, ebx
add edi, dword [ebp + 8]
mov ecx, edi
call fcn.30002a00
test eax, eax
jne 0x30013b70
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.30159c2d
mov esp, ebp
pop ebp
ret 0xc
cmp edi, dword [ebp + 8]
jb 0x30013c3c
lea esp, [esp]
push ebx
lea eax, [ebp - 0x68]
push 0
push eax
call fcn.3015cdc0
mov cl, byte [ebp + 0x10]
add esp, 0xc
test cl, cl
je 0x30013bb5
lea eax, [ebp - 0x68]
mov edx, ebx
push eax
mov ecx, edi
call fcn.300158e0
mov cl, al
add esp, 4
mov byte [ebp - 0x69], cl
test cl, cl
je 0x30013c39
jmp 0x30013c07
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x7c], 0
mov eax, dword [eax + 0x3c]
mov dword [ebp - 0x78], eax
cmp eax, 0xffffffff
je 0x30013c9d
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 0x30013beb
test eax, eax
jne 0x30013c35
push 0
lea eax, [ebp - 0x7c]
push eax
push ebx
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x30013c35
mov byte [ebp - 0x69], 1
lea eax, [ebx - 1]
test eax, eax
js 0x30013c23
mov edi, edi
cmp byte [ebp + eax - 0x68], 0
jne 0x30013c1e
sub eax, 1
jns 0x30013c10
jmp 0x30013c23
add eax, 1
jne 0x30013c7d
mov ebx, 0x64
sub edi, ebx
cmp edi, dword [ebp + 8]
jae 0x30013b80
jmp 0x30013c39
mov byte [ebp - 0x69], 0
mov esi, dword [ebp - 0x70]
mov ebx, dword [ebp + 8]
mov cl, byte [ebp + 0x10]
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x30013caa
push eax
test cl, cl
jne 0x30013aba
mov dword [ebp - 0x78], 0
call fcn.3015a252
add esp, 4
mov dword [esi + 0x28], eax
push 0
push 0
push ebx
mov ebx, dword [ebp - 0x74]
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x78]
jmp 0x30013b09
mov ebx, dword [ebp + 8]
add edi, eax
mov esi, dword [ebp - 0x70]
cmp ebx, edi
jae 0x30013c3f
mov ecx, dword [esi + 0x30]
sub edi, ebx
lea eax, [edi + 4]
mov dword [esi + 0x2c], eax
cmp ecx, eax
jae 0x30013c3f
mov dword [esi + 0x2c], ecx
jmp 0x30013c3f
mov esi, dword [ebp - 0x70]
xor al, al
mov ebx, dword [ebp + 8]
mov byte [ebp - 0x69], al
jmp 0x30013c42
mov al, byte [ebp - 0x69]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.30159c2d
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.30159c2d
mov esp, ebp
pop ebp
ret 0xc