Function at 0x4157cd
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 0x415b54
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x415b54
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 0x415839
push 3
push eax
call fcn.00413c14
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 0x415b4f
add eax, ecx
mov ecx, dword [eax]
add ecx, dword [ebp - 4]
xor ecx, dword [eax + 0xc]
mov dword [ebp - 4], ecx
jmp 0x415b4f
push 1
push dword [0x468020]
call fcn.00413c14
push 2
push dword [0x468020]
mov edi, eax
call fcn.00413c14
add esp, 0x10
cmp dword [ebx + 8], edi
jne 0x4158d0
cmp dword [ebx + 0xc], eax
jne 0x4158d0
push 3
push dword [0x468020]
call fcn.00413c14
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 0x41589b
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.00437be0
pop ecx
inc eax
push eax
call fcn.00417a63
mov ecx, dword [ebp + 0x10]
xor edi, edi
cmp eax, edi
mov dword [ecx], eax
je 0x415a4e
push dword [0x468020]
push eax
call fcn.00439630
pop ecx
pop ecx
jmp 0x415a4e
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.0041529a
test eax, eax
je 0x415a2c
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x118]
cmp dword [ecx], ebx
jne 0x415924
cmp dword [0x46d630], ebx
je 0x415924
push eax
call fcn.004146e9
jmp 0x415a2c
push ebx
push eax
call fcn.004137d6
mov edi, eax
cmp edi, ebx
jbe 0x415961
lea eax, [edi + 1]
push eax
call fcn.00417a63
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x415946
push dword [ebp - 0xc]
jmp 0x41591a
push ebx
push ebx
push edi
push eax
push dword [ebp - 0xc]
call fcn.00414812
test eax, eax
jne 0x415961
push dword [ebp - 8]
call fcn.004179da
mov dword [ebp - 8], ebx
push dword [ebp - 0xc]
call fcn.004146e9
cmp dword [ebp - 8], ebx
je 0x415a2c
mov ebx, dword [ebp - 8]
cmp byte [ebx], 0
je 0x415a22
push ebx
call fcn.00413aee
lea edi, [eax + ebx]
mov al, byte [edi]
push 1
push ebx
mov byte [ebp + 0xb], al
mov byte [edi], 0
call fcn.00413c14
push 2
push ebx
mov dword [ebp - 0x18], eax
call fcn.00413c14
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
add esp, 0x14
cmp dword [ecx + 8], edx
jne 0x4159b5
cmp dword [ecx + 0xc], eax
je 0x4159c9
mov al, byte [ebp + 0xb]
push ebx
mov byte [edi], al
call fcn.00413b37
mov ebx, eax
test ebx, ebx
pop ecx
jne 0x415975
jmp 0x415a22
push 3
push ebx
call fcn.00413c14
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 0x4159fd
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.00437be0
pop ecx
inc eax
push eax
call fcn.00417a63
test eax, eax
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
je 0x415a1d
push ebx
push eax
call fcn.00439630
pop ecx
pop ecx
cmp byte [ebx], 0
jne 0x415a3c
push dword [ebp - 8]
call fcn.004179da
xor ebx, ebx
add dword [ebp - 0x10], 4
cmp dword [ebp - 0x10], 0x1c
jb 0x4158dd
jmp 0x415a44
push dword [ebp - 8]
call fcn.004179da
mov eax, dword [ebp - 0x1c]
mov dword [0x46d630], eax
xor edi, edi
cmp dword [ebp - 4], edi
jne 0x415b4f
mov ebx, dword [ebp - 0x14]
mov eax, dword [esi + 0x11c]
shl ebx, 4
test word [ebx + eax + 4], 0x300
je 0x415b4f
push 4
push dword [0x468014]
lea eax, [esi + 0x124]
push eax
mov dword [ebp - 0x14], edi
call fcn.00437c6b
add esp, 0xc
test eax, eax
jne 0x415ac3
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 0x415ae3
inc eax
lea eax, [eax*4 + 4]
push eax
mov dword [ebp - 0x10], eax
call fcn.00417a63
test eax, eax
mov dword [ebp + 8], eax
je 0x415b54
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.00413d5f
add esp, 0xc
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.004179da
mov eax, dword [ebp - 4]
jmp 0x415b56
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret