Function at 0x4158a4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
test esi, esi
push edi
je 0x415c2b
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x415c2b
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
and dword [ebp - 4], 0
test eax, eax
mov edi, dword [ebx + 4]
mov dword [ebp - 0x14], edi
je 0x415910
push 3
push eax
call fcn.00413cca
mov dword [ebp - 4], eax
pop ecx
add esi, 0x11c
mov eax, edi
pop ecx
mov ecx, dword [esi]
shl eax, 4
test dword [eax + ecx + 4], 0x20000
je 0x415c26
add eax, ecx
mov ecx, dword [eax]
add ecx, dword [ebp - 4]
xor ecx, dword [eax + 0xc]
mov dword [ebp - 4], ecx
jmp 0x415c26
push 1
push dword [0x468020]
call fcn.00413cca
push 2
push dword [0x468020]
mov edi, eax
call fcn.00413cca
add esp, 0x10
cmp dword [ebx + 8], edi
jne 0x4159a7
cmp dword [ebx + 0xc], eax
jne 0x4159a7
push 3
push dword [0x468020]
call fcn.00413cca
pop ecx
pop ecx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 4], eax
lea eax, [esi + 0x11c]
mov edx, dword [eax]
shl ecx, 4
test dword [ecx + edx + 4], 0x20000
je 0x415972
mov eax, edx
add eax, ecx
mov ecx, dword [eax]
add ecx, dword [ebp - 4]
xor ecx, dword [eax + 0xc]
mov dword [ebp - 4], ecx
push dword [0x468020]
call fcn.00437c60
pop ecx
inc eax
push eax
call fcn.00413f20
mov ecx, dword [ebp + 0x10]
xor edi, edi
cmp eax, edi
mov dword [ecx], eax
je 0x415b25
push dword [0x468020]
push eax
call fcn.004396b0
pop ecx
pop ecx
jmp 0x415b25
mov eax, dword [0x46d630]
xor ebx, ebx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x468038]
mov dword [0x46d630], eax
lea eax, [ebp - 0xc]
push eax
push ebx
push dword [0x468020]
push esi
call fcn.00415371
test eax, eax
je 0x415b03
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x118]
cmp dword [ecx], ebx
jne 0x4159fb
cmp dword [0x46d630], ebx
je 0x4159fb
push eax
call fcn.004147c0
jmp 0x415b03
push ebx
push eax
call fcn.0041388c
mov edi, eax
cmp edi, ebx
jbe 0x415a38
lea eax, [edi + 1]
push eax
call fcn.00413f20
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x415a1d
push dword [ebp - 0xc]
jmp 0x4159f1
push ebx
push ebx
push edi
push eax
push dword [ebp - 0xc]
call fcn.004148e9
test eax, eax
jne 0x415a38
push dword [ebp - 8]
call fcn.00417ab1
mov dword [ebp - 8], ebx
push dword [ebp - 0xc]
call fcn.004147c0
cmp dword [ebp - 8], ebx
je 0x415b03
mov ebx, dword [ebp - 8]
cmp byte [ebx], 0
je 0x415af9
push ebx
call fcn.00413ba4
lea edi, [eax + ebx]
mov al, byte [edi]
push 1
push ebx
mov byte [ebp + 0xb], al
mov byte [edi], 0
call fcn.00413cca
push 2
push ebx
mov dword [ebp - 0x18], eax
call fcn.00413cca
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
add esp, 0x14
cmp dword [ecx + 8], edx
jne 0x415a8c
cmp dword [ecx + 0xc], eax
je 0x415aa0
mov al, byte [ebp + 0xb]
push ebx
mov byte [edi], al
call fcn.00413bed
mov ebx, eax
test ebx, ebx
pop ecx
jne 0x415a4c
jmp 0x415af9
push 3
push ebx
call fcn.00413cca
pop ecx
pop ecx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 4], eax
lea eax, [esi + 0x11c]
mov edx, dword [eax]
shl ecx, 4
test dword [ecx + edx + 4], 0x20000
je 0x415ad4
mov eax, edx
add eax, ecx
mov ecx, dword [eax]
add ecx, dword [ebp - 4]
xor ecx, dword [eax + 0xc]
mov dword [ebp - 4], ecx
push ebx
call fcn.00437c60
pop ecx
inc eax
push eax
call fcn.00413f20
test eax, eax
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
je 0x415af4
push ebx
push eax
call fcn.004396b0
pop ecx
pop ecx
cmp byte [ebx], 0
jne 0x415b13
push dword [ebp - 8]
call fcn.00417ab1
xor ebx, ebx
add dword [ebp - 0x10], 4
cmp dword [ebp - 0x10], 0x1c
jb 0x4159b4
jmp 0x415b1b
push dword [ebp - 8]
call fcn.00417ab1
mov eax, dword [ebp - 0x1c]
mov dword [0x46d630], eax
xor edi, edi
cmp dword [ebp - 4], edi
jne 0x415c26
mov ebx, dword [ebp - 0x14]
mov eax, dword [esi + 0x11c]
shl ebx, 4
test word [ebx + eax + 4], 0x300
je 0x415c26
push 4
push dword [0x468014]
lea eax, [esi + 0x124]
push eax
mov dword [ebp - 0x14], edi
call fcn.00437ceb
add esp, 0xc
test eax, eax
jne 0x415b9a
mov eax, dword [esi + 0x11c]
mov eax, dword [ebx + eax]
add eax, dword [esi + 0x15c]
push edi
push edi
push eax
push dword [esi + 0x120]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
lea eax, [ebp - 0x1c]
push eax
push 4
lea eax, [ebp - 0x14]
push eax
push dword [esi + 0x120]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov cl, byte [esi + 0x142]
mov eax, dword [esi + 0x11c]
mov eax, dword [ebx + eax + 0xc]
mov edi, 0x200
shl edi, cl
xor edx, edx
div edi
test edx, edx
je 0x415bba
inc eax
lea eax, [eax*4 + 4]
push eax
mov dword [ebp - 0x10], eax
call fcn.00413f20
test eax, eax
mov dword [ebp + 8], eax
je 0x415c2b
mov eax, dword [esi + 0x11c]
mov eax, dword [ebx + eax]
add eax, dword [esi + 0x15c]
push 0
add eax, dword [ebp - 0x14]
push 0
push eax
push dword [esi + 0x120]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x10]
push dword [ebp + 8]
push dword [esi + 0x120]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.00413e15
add esp, 0xc
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.00417ab1
mov eax, dword [ebp - 4]
jmp 0x415c2d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret