Function at 0x1013ebc0
Capabilities:
Read file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi + 0x38]
test byte [eax], 8
mov dword [esp + 4], eax
jne 0x1013ebe1
mov dword [0x1018612c], 0x6f
xor eax, eax
pop esi
pop ecx
ret
push ebp
lea ebp, [esi + 0x18]
push ebp
mov edx, esi
call fcn.1013e790
add esp, 4
test eax, eax
je 0x1013ee41
lea eax, [esi + 0x1c]
push eax
mov edx, esi
call fcn.1013e790
add esp, 4
test eax, eax
je 0x1013ee41
lea eax, [esi + 0x20]
push eax
mov edx, esi
call fcn.1013e790
add esp, 4
test eax, eax
je 0x1013ee41
lea eax, [esi + 0x24]
push eax
mov edx, esi
call fcn.1013e790
add esp, 4
test eax, eax
je 0x1013ee41
mov eax, dword [esi + 0x38]
mov ecx, dword [eax + 0x3c]
push ebx
xor ebx, ebx
cmp ecx, ebx
je 0x1013ec56
push 1
lea edx, [esp + 0x18]
push edx
push esi
call ecx
add esp, 0xc
jmp 0x1013ec6c
mov eax, dword [eax + 0x38]
push eax
push 1
lea ecx, [esp + 0x1c]
push 1
push ecx
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x1013ec82
pop ebx
pop ebp
mov dword [0x1018612c], 0x66
xor eax, eax
pop esi
pop ecx
ret
mov cl, byte [esp + 0x14]
movzx eax, cl
push edi
mov edi, eax
and edi, 7
and eax, 0x40
inc edi
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0x2c]
test cl, cl
jns 0x1013eda1
cmp eax, ebx
je 0x1013ecb3
cmp dword [esi + 0x30], ebx
jne 0x1013ecb3
push eax
call fcn.10140460
add esp, 4
mov ecx, edi
mov edx, 1
shl edx, cl
push ebx
push edx
call fcn.101403d0
add esp, 8
mov dword [esi + 0x2c], eax
cmp eax, ebx
je 0x1013ed6a
cmp dword [eax], ebx
jle 0x1013ed42
xor edi, edi
mov eax, dword [esi + 0x38]
mov ecx, dword [eax + 0x3c]
test ecx, ecx
je 0x1013ecf0
push 3
lea eax, [esp + 0x1c]
push eax
push esi
call ecx
add esp, 0xc
jmp 0x1013ed06
mov ecx, dword [eax + 0x38]
push ecx
push 3
lea edx, [esp + 0x20]
push 1
push edx
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
cmp eax, 3
jne 0x1013ed7c
mov eax, dword [esi + 0x2c]
mov ecx, dword [eax + 8]
movzx edx, byte [esp + 0x18]
mov byte [edi + ecx], dl
mov eax, dword [esi + 0x2c]
mov ecx, dword [eax + 8]
movzx edx, byte [esp + 0x19]
mov byte [ecx + edi + 1], dl
mov eax, dword [esi + 0x2c]
movzx edx, byte [esp + 0x1a]
mov ecx, dword [eax + 8]
mov byte [ecx + edi + 2], dl
mov eax, dword [esi + 0x2c]
inc ebx
add edi, 3
cmp ebx, dword [eax]
jl 0x1013ecd7
xor ebx, ebx
mov ecx, dword [esi + 0x30]
cmp ecx, ebx
je 0x1013edb3
mov eax, dword [esi + 0x14]
inc eax
lea edx, [eax + eax*4]
add edx, edx
add edx, edx
add edx, edx
push edx
push ecx
call dword [sym.imp.MSVCR90.dll_realloc]
add esp, 8
mov dword [esi + 0x30], eax
cmp eax, ebx
jne 0x1013edc5
pop edi
pop ebx
pop ebp
mov dword [0x1018612c], 0x6d
xor eax, eax
pop esi
pop ecx
ret
mov ecx, dword [esi + 0x2c]
push ecx
call fcn.10140460
add esp, 4
pop edi
pop ebx
mov dword [0x1018612c], 0x66
pop ebp
mov dword [esi + 0x2c], 0
xor eax, eax
pop esi
pop ecx
ret
cmp eax, ebx
je 0x1013ed44
push eax
call fcn.10140460
add esp, 4
mov dword [esi + 0x2c], ebx
jmp 0x1013ed44
push 0x28
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
mov dword [esi + 0x30], eax
cmp eax, ebx
je 0x1013ed6a
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x30]
mov edx, dword [ebp]
lea eax, [eax + eax*4]
lea edi, [ecx + eax*8]
mov dword [edi], edx
mov eax, dword [ebp + 4]
mov dword [edi + 4], eax
mov ecx, dword [ebp + 8]
mov dword [edi + 8], ecx
mov edx, dword [ebp + 0xc]
mov dword [edi + 0xc], edx
mov eax, dword [ebp + 0x10]
mov dword [edi + 0x10], eax
mov ecx, dword [ebp + 0x14]
mov dword [edi + 0x14], ecx
mov eax, dword [esi + 0x2c]
cmp eax, ebx
je 0x1013ee15
mov edx, dword [eax + 8]
mov eax, dword [eax]
push edx
push eax
call fcn.101403d0
add esp, 8
mov dword [edi + 0x14], eax
cmp eax, ebx
je 0x1013ed6a
mov edx, dword [esp + 0x10]
mov dword [edi + 0x18], ebx
mov dword [edi + 0x20], ebx
mov dword [edi + 0x24], ebx
mov ecx, dword [esi + 0x20]
imul ecx, dword [esi + 0x24]
inc dword [esi + 0x14]
mov eax, esi
mov dword [edx + 0x34], ecx
call fcn.1013e8b0
pop edi
pop ebx
pop ebp
mov eax, 1
pop esi
pop ecx
ret
pop ebp
xor eax, eax
pop esi
pop ecx
ret