Function at 0x415762
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 0x415ae9
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x415ae9
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 0x4157ce
push 3
push eax
call fcn.00413b88
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 0x415ae4
add eax, ecx
mov ecx, dword [eax]
add ecx, dword [ebp - 4]
xor ecx, dword [eax + 0xc]
mov dword [ebp - 4], ecx
jmp 0x415ae4
push 1
push dword [0x468020]
call fcn.00413b88
push 2
push dword [0x468020]
mov edi, eax
call fcn.00413b88
add esp, 0x10
cmp dword [ebx + 8], edi
jne 0x415865
cmp dword [ebx + 0xc], eax
jne 0x415865
push 3
push dword [0x468020]
call fcn.00413b88
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 0x415830
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.00437b40
pop ecx
inc eax
push eax
call fcn.00413dde
mov ecx, dword [ebp + 0x10]
xor edi, edi
cmp eax, edi
mov dword [ecx], eax
je 0x4159e3
push dword [0x468020]
push eax
call fcn.00439590
pop ecx
pop ecx
jmp 0x4159e3
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.0041522f
test eax, eax
je 0x4159c1
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x118]
cmp dword [ecx], ebx
jne 0x4158b9
cmp dword [0x46d630], ebx
je 0x4158b9
push eax
call fcn.0041467e
jmp 0x4159c1
push ebx
push eax
call fcn.0041374a
mov edi, eax
cmp edi, ebx
jbe 0x4158f6
lea eax, [edi + 1]
push eax
call fcn.00413dde
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x4158db
push dword [ebp - 0xc]
jmp 0x4158af
push ebx
push ebx
push edi
push eax
push dword [ebp - 0xc]
call fcn.004147a7
test eax, eax
jne 0x4158f6
push dword [ebp - 8]
call fcn.004136f6
mov dword [ebp - 8], ebx
push dword [ebp - 0xc]
call fcn.0041467e
cmp dword [ebp - 8], ebx
je 0x4159c1
mov ebx, dword [ebp - 8]
cmp byte [ebx], 0
je 0x4159b7
push ebx
call fcn.00413a62
lea edi, [eax + ebx]
mov al, byte [edi]
push 1
push ebx
mov byte [ebp + 0xb], al
mov byte [edi], 0
call fcn.00413b88
push 2
push ebx
mov dword [ebp - 0x18], eax
call fcn.00413b88
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
add esp, 0x14
cmp dword [ecx + 8], edx
jne 0x41594a
cmp dword [ecx + 0xc], eax
je 0x41595e
mov al, byte [ebp + 0xb]
push ebx
mov byte [edi], al
call fcn.00413aab
mov ebx, eax
test ebx, ebx
pop ecx
jne 0x41590a
jmp 0x4159b7
push 3
push ebx
call fcn.00413b88
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 0x415992
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.00437b40
pop ecx
inc eax
push eax
call fcn.00413dde
test eax, eax
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
je 0x4159b2
push ebx
push eax
call fcn.00439590
pop ecx
pop ecx
cmp byte [ebx], 0
jne 0x4159d1
push dword [ebp - 8]
call fcn.004136f6
xor ebx, ebx
add dword [ebp - 0x10], 4
cmp dword [ebp - 0x10], 0x1c
jb 0x415872
jmp 0x4159d9
push dword [ebp - 8]
call fcn.004136f6
mov eax, dword [ebp - 0x1c]
mov dword [0x46d630], eax
xor edi, edi
cmp dword [ebp - 4], edi
jne 0x415ae4
mov ebx, dword [ebp - 0x14]
mov eax, dword [esi + 0x11c]
shl ebx, 4
test word [ebx + eax + 4], 0x300
je 0x415ae4
push 4
push dword [0x468014]
lea eax, [esi + 0x124]
push eax
mov dword [ebp - 0x14], edi
call fcn.00437bcb
add esp, 0xc
test eax, eax
jne 0x415a58
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 0x415a78
inc eax
lea eax, [eax*4 + 4]
push eax
mov dword [ebp - 0x10], eax
call fcn.00413dde
test eax, eax
mov dword [ebp + 8], eax
je 0x415ae9
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.00413cd3
add esp, 0xc
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.004136f6
mov eax, dword [ebp - 4]
jmp 0x415aeb
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret