Function at 0x30f15e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x310e008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 0x20
push 0x3008014
push edi
mov esi, ecx
mov dword [ebp - 0x54], edi
call fcn.030df7a0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x30f1676
mov dword [esi], 0x12
mov word [esi + 4], ax
cmp byte [esi + 0x81c], al
jne 0x30f1647
mov eax, dword [esi + 0x808]
mov byte [esi + 0x81c], 1
test eax, eax
je 0x30f1641
push 1
push dword [esi + 0x804]
call eax
add esp, 8
mov dword [esi + 0x820], eax
mov eax, dword [esi + 0x820]
test eax, eax
je 0x30f1661
push 0
push 0x12
push edi
push dword [esi + 0x804]
call eax
add esp, 0x10
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0307c5f7
mov esp, ebp
pop ebp
ret 4
push ebx
push 1
lea eax, [ebp - 0x50]
push 0x30
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x30f16fe
xor eax, eax
mov dword [esi], 0xb
mov word [esi + 4], ax
cmp byte [esi + 0x81c], al
jne 0x30f16c5
mov eax, dword [esi + 0x808]
mov byte [esi + 0x81c], 1
test eax, eax
je 0x30f16bf
push 1
push dword [esi + 0x804]
call eax
add esp, 8
mov dword [esi + 0x820], eax
mov eax, dword [esi + 0x820]
test eax, eax
je 0x30f16df
push 0
push 0xb
push edi
push dword [esi + 0x804]
call eax
add esp, 0x10
push ebx
call dword [sym.imp.msvcrt.dll_fclose]
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0307c5f7
mov esp, ebp
pop ebp
ret 4
mov eax, 0x4944
cmp word [ebp - 0x50], ax
jne 0x30f168d
mov eax, dword [ebp - 0x38]
push 1
lea ecx, [eax + eax*4]
mov eax, dword [ebp - 0x34]
lea eax, [eax + ecx*8]
push eax
push ebx
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x30f1734
push 0
push 0xb
push edi
mov ecx, esi
call fcn.030f2720
jmp 0x30f16df
push ebx
call dword [sym.imp.msvcrt.dll_ftell]
mov edi, dword [ebp - 0x30]
mov dword [ebp - 0x58], eax
mov eax, 0x24924925
mul edi
sub edi, edx
shr edi, 1
add edi, edx
shr edi, 4
add esp, 4
test edi, edi
je 0x30f179f
push ebx
push 1
lea eax, [ebp - 0x20]
push 0x1c
push eax
dec edi
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x30f17cc
cmp byte [esi + 0xc94], 0
jne 0x30f179b
cmp dword [ebp - 0x14], 2
jne 0x30f179b
mov eax, dword [ebp - 0x10]
mov dword [esi + 0xc98], eax
mov eax, dword [ebp - 8]
mov dword [esi + 0xc9c], 0
mov dword [esi + 0xca0], eax
test edi, edi
jne 0x30f1758
mov eax, dword [ebp - 0x48]
cmp eax, dword [esi + 0xc80]
je 0x30f17e0
mov ecx, dword [esi + 0xc84]
test ecx, ecx
je 0x30f17b8
cmp eax, ecx
je 0x30f17e0
mov edi, dword [ebp - 0x54]
push 0
push 0x14
push edi
mov ecx, esi
call fcn.030f2720
jmp 0x30f16df
mov edi, dword [ebp - 0x54]
push 0
push 0xb
push edi
mov ecx, esi
call fcn.030f2720
jmp 0x30f16df
mov edi, dword [ebp - 0x54]
push edi
call dword [sym.imp.msvcrt.dll__wcsdup]
add esp, 4
mov ecx, esi
push 0
push 0
push edi
mov dword [esi + 0xc90], eax
mov dword [esi + 0xc8c], ebx
call fcn.030f2720
push 0
push dword [ebp - 0x58]
push ebx
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x30f1859
mov edi, dword [ebp - 0x30]
mov eax, 0x24924925
mul edi
sub edi, edx
shr edi, 1
add edi, edx
shr edi, 4
test edi, edi
je 0x30f1859
nop
push ebx
push 1
lea eax, [ebp - 0x20]
push 0x1c
push eax
dec edi
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x30f1859
lea eax, [ebp - 0x20]
push eax
push 0
mov ecx, esi
call fcn.030f2660
test edi, edi
jne 0x30f1830
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.0307c5f7
mov esp, ebp
pop ebp
ret 4