Function at 0x30064941
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, 0x3016f182
call fcn.30118c00
sub esp, 0x81c
mov eax, dword [section..cdata]
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x824], ecx
call dword [0x30193268]
mov edi, eax
mov dword [ebp - 0x81c], edi
cmp edi, 0xffffffff
mov dword [ebp - 4], ebx
jne 0x3006499f
push ebx
push dword [ebp + 8]
push 0x34
push ebx
call fcn.300eedb4
push edi
jmp 0x30064bb2
lea eax, [ebp - 0x828]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [ebp - 0x828], ebx
jne 0x30064ba1
cmp eax, 0x186a0
ja 0x30064ba1
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea eax, [ebp - 0x814]
push eax
push 2
lea eax, [ebp - 0x820]
push eax
push edi
mov dword [ebp - 0x814], ebx
call esi
test eax, eax
je 0x30064bad
mov eax, dword [0x301913c0]
mov dword [ebp - 0x818], eax
cmp dword [ebp - 0x814], 2
mov byte [ebp - 4], 1
jne 0x30064a13
cmp word [ebp - 0x820], 0xfeff
je 0x30064aa0
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, 0x400
jmp 0x30064b35
cmp dword [ebp - 0x814], ebx
je 0x30064b5b
test dword [ebp - 0x814], 0xfffffffe
mov dword [ebp + 8], ebx
jbe 0x30064aa0
mov eax, dword [ebp + 8]
mov cx, word [ebp + eax*2 - 0x810]
movzx eax, cx
cmp eax, 0xa
je 0x30064a68
cmp eax, 0xd
je 0x30064a68
push ecx
lea ecx, [ebp - 0x818]
call fcn.30136bba
jmp 0x30064a90
mov eax, dword [ebp - 0x818]
cmp word [eax], bx
je 0x30064a90
mov ecx, dword [ebp - 0x824]
lea eax, [ebp - 0x818]
push eax
call fcn.3006489d
lea ecx, [ebp - 0x818]
call fcn.30135155
mov eax, dword [ebp - 0x814]
inc dword [ebp + 8]
shr eax, 1
cmp dword [ebp + 8], eax
jb 0x30064a42
push ebx
lea eax, [ebp - 0x814]
push eax
push 0x800
lea eax, [ebp - 0x810]
push eax
push edi
call esi
test eax, eax
jne 0x30064a27
jmp 0x30064b5b
cmp dword [ebp - 0x814], ebx
je 0x30064b55
xor eax, eax
cmp dword [ebp - 0x814], ebx
mov dword [ebp + 8], eax
jbe 0x30064b35
mov al, byte [ebp + eax - 0x410]
cmp al, 0xa
je 0x30064afe
cmp al, 0xd
je 0x30064afe
movzx ax, al
lea ecx, [ebp - 0x818]
push eax
call fcn.30136bba
jmp 0x30064b26
mov eax, dword [ebp - 0x818]
cmp word [eax], bx
je 0x30064b26
mov ecx, dword [ebp - 0x824]
lea eax, [ebp - 0x818]
push eax
call fcn.3006489d
lea ecx, [ebp - 0x818]
call fcn.30135155
mov eax, dword [ebp + 8]
inc eax
cmp eax, dword [ebp - 0x814]
mov dword [ebp + 8], eax
jb 0x30064add
push ebx
lea eax, [ebp - 0x814]
push eax
push edi
lea eax, [ebp - 0x410]
push eax
push dword [ebp - 0x81c]
call esi
test eax, eax
jne 0x30064ac4
mov edi, dword [ebp - 0x81c]
mov eax, dword [ebp - 0x818]
cmp word [eax], bx
je 0x30064b7e
mov ecx, dword [ebp - 0x824]
lea eax, [ebp - 0x818]
push eax
call fcn.3006489d
mov eax, dword [ebp - 0x818]
cmp eax, dword [0x301913c0]
mov byte [ebp - 4], bl
je 0x30064b92
add eax, 0xfffffff8
push eax
call fcn.30134ce8
cmp edi, ebx
je 0x30064b9d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x30064bba
push ebx
push dword [ebp + 8]
push 0x39
push ebx
call fcn.300eedb4
cmp edi, ebx
je 0x30064bb8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop ebx
call fcn.30118d85
leave
ret 4