Function at 0x4147a7
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, ebx
push edi
je 0x414e11
cmp dword [ebp + 0xc], ebx
je 0x414e11
mov eax, dword [esi + 0x128]
cmp eax, 0xffffffff
je 0x4147fd
push dword [ebp + 0x18]
lea ecx, [ebp + 8]
push ecx
push dword [ebp + 0x10]
mov dword [ebp + 8], ebx
push dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov ecx, dword [ebp + 0x14]
cmp ecx, ebx
je 0x414e1b
mov edx, dword [ebp + 8]
mov dword [ecx], edx
jmp 0x414e1b
mov edi, dword [ebp + 0x18]
cmp edi, ebx
je 0x41482a
cmp dword [edi], ebx
jne 0x41481c
cmp dword [edi + 4], ebx
jne 0x41481c
cmp dword [edi + 8], ebx
jne 0x41481c
cmp dword [edi + 0xc], ebx
jne 0x41481c
cmp dword [edi + 0x10], ebx
je 0x41482a
push ebx
lea eax, [edi + 0xc]
push eax
push dword [edi + 8]
push esi
call fcn.0041378e
cmp dword [ebp + 0x10], ebx
jne 0x414847
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x414838
mov dword [eax], ebx
cmp edi, ebx
je 0x41483f
mov dword [edi + 4], ebx
xor eax, eax
inc eax
jmp 0x414e1b
mov eax, dword [esi + 0x11c]
mov ebx, dword [esi + 0x130]
mov eax, dword [eax + 0xc]
cmp ebx, eax
mov edi, dword [esi + 0x114]
ja 0x414e19
jne 0x41487d
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x414870
and dword [eax], 0
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x41483f
and dword [eax + 4], 0
jmp 0x41483f
mov eax, dword [esi + 0x118]
mov eax, dword [eax + 4]
mov ecx, dword [edi + 0x11c]
and dword [ebp + 8], 0
shl eax, 4
mov dword [ebp - 0xc], eax
mov eax, dword [eax + ecx + 0xc]
mov ecx, dword [ebp + 0x10]
add ecx, ebx
cmp ecx, eax
jbe 0x4148a8
sub eax, ebx
mov dword [ebp + 0x10], eax
mov cl, byte [edi + 0x142]
mov eax, 0x200
shl eax, cl
xor edx, edx
mov dword [ebp - 8], eax
mov eax, ebx
div dword [ebp - 8]
mov eax, ebx
sub eax, edx
mov dword [ebp - 0x38], edx
xor edx, edx
div dword [ebp - 8]
xor edx, edx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0x10]
add ebx, eax
mov eax, ebx
div dword [ebp - 8]
mov ecx, edx
test ecx, ecx
mov dword [ebp - 0x20], eax
je 0x4148e6
inc dword [ebp - 0x20]
mov edx, dword [ebp - 0xc]
mov eax, dword [edi + 0x11c]
mov eax, dword [edx + eax + 0xc]
mov ebx, dword [ebp - 8]
xor edx, edx
div ebx
test edx, edx
mov dword [ebp - 0x1c], eax
je 0x414904
inc dword [ebp - 0x1c]
test ecx, ecx
mov dword [ebp - 0x3c], ecx
jne 0x41490e
mov dword [ebp - 0x3c], ebx
push ebx
call fcn.00413dde
test eax, eax
mov dword [ebp - 4], eax
jne 0x414939
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x414925
and dword [eax], 0
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x414e19
and dword [eax + 4], 0
jmp 0x414e19
shl ebx, 4
push ebx
call fcn.00413dde
test eax, eax
mov dword [ebp - 0x18], eax
jne 0x414953
push dword [ebp - 4]
call fcn.004136f6
jmp 0x41491b
mov eax, dword [esi + 0x12c]
and dword [ebp - 0x2c], 0
push 4
push dword [0x468014]
mov dword [ebp - 0x24], eax
lea eax, [edi + 0x124]
push eax
call fcn.00437bcb
mov ebx, dword [sym.imp.KERNEL32.DLL_ReadFile]
add esp, 0xc
test eax, eax
jne 0x4149b8
mov eax, dword [edi + 0x11c]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + eax]
add eax, dword [edi + 0x15c]
push 0
push 0
push eax
push dword [edi + 0x120]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
push 0
lea eax, [ebp - 0x30]
push eax
push 4
lea eax, [ebp - 0x2c]
push eax
push dword [edi + 0x120]
call ebx
cmp dword [esi + 0x108], 0
jne 0x414a9f
mov eax, dword [ebp - 0x1c]
lea eax, [eax*4 + 4]
push eax
mov dword [ebp - 0x34], eax
call fcn.00413dde
test eax, eax
mov dword [ebp - 0x14], eax
jne 0x4149ec
push dword [ebp - 0x18]
call fcn.004136f6
jmp 0x414949
mov eax, dword [edi + 0x11c]
mov ecx, dword [ebp - 0xc]
add eax, ecx
test word [eax + 4], 0x300
jne 0x414a40
mov edx, dword [ebp - 0x1c]
lea ecx, [edx + 1]
xor eax, eax
test ecx, ecx
jbe 0x414a96
xor ecx, ecx
cmp eax, edx
jae 0x414a1d
mov ebx, dword [ebp - 0x14]
mov dword [ebx + eax*4], ecx
jmp 0x414a33
mov edx, dword [edi + 0x11c]
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebx + edx + 0xc]
mov ebx, dword [ebp - 0x14]
mov dword [ebx + eax*4], edx
mov edx, dword [ebp - 0x1c]
add ecx, dword [ebp - 8]
inc eax
lea ebx, [edx + 1]
cmp eax, ebx
jb 0x414a11
jmp 0x414a96
mov ecx, dword [edi + 0x15c]
add ecx, dword [eax]
push 0
add ecx, dword [ebp - 0x2c]
push 0
push ecx
push dword [edi + 0x120]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
push 0
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x14]
push dword [edi + 0x120]
call ebx
mov eax, dword [edi + 0x11c]
mov ecx, dword [ebp - 0xc]
test dword [ecx + eax + 4], 0x10000
je 0x414a96
mov eax, dword [ebp - 0x24]
dec eax
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x14]
call fcn.00413c74
add esp, 0xc
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x108], eax
mov eax, dword [ebp - 8]
add eax, 3
push eax
call fcn.00413dde
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x414ae0
push dword [ebp - 0x18]
call fcn.004136f6
push dword [ebp - 4]
call fcn.004136f6
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x414acd
mov dword [eax], ebx
mov eax, dword [ebp + 0x18]
cmp eax, ebx
je 0x414e19
mov dword [eax + 4], ebx
jmp 0x414e19
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp - 0x20]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x10], eax
jae 0x414da4
push 0x10
pop eax
sub eax, dword [ebp - 0x24]
mov dword [ebp - 0x48], eax
xor eax, eax
cmp dword [ebp - 0x28], eax
jne 0x414b81
mov ebx, dword [ebp - 0x10]
mov ecx, dword [edi + 0x11c]
mov edx, dword [ebp - 0xc]
push eax
push eax
mov eax, dword [esi + 0x108]
shl ebx, 2
mov eax, dword [ebx + eax]
add eax, dword [edx + ecx]
add eax, dword [edi + 0x15c]
add eax, dword [ebp - 0x2c]
push eax
push dword [edi + 0x120]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x40], eax
add eax, ecx
add eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
cmp eax, ecx
mov eax, dword [esi + 0x108]
push 0
jbe 0x414b5e
mov ecx, dword [eax + ecx*4]
lea edx, [ebp - 0x30]
push edx
jmp 0x414b66
lea ecx, [ebp - 0x30]
push ecx
mov ecx, dword [ebx + eax + 0x40]
sub ecx, dword [ebx + eax]
push ecx
push dword [ebp - 0x18]
push dword [edi + 0x120]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x414dde
mov eax, dword [esi + 0x108]
mov ebx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x28]
shl ebx, 2
mov ecx, dword [ebx + eax + 4]
sub ecx, dword [ebx + eax]
push ecx
mov ecx, dword [ebp - 0x40]
add edx, ecx
mov edx, dword [eax + edx*4]
sub edx, dword [eax + ecx*4]
add edx, dword [ebp - 0x18]
push edx
push dword [ebp - 4]
call fcn.004377d0
mov eax, dword [edi + 0x11c]
mov ecx, dword [ebp - 0xc]
add esp, 0xc
test dword [ecx + eax + 4], 0x10000
je 0x414be7
mov edx, dword [ebp - 0x24]
mov eax, dword [esi + 0x108]
mov ecx, dword [ebp - 0x10]
add ecx, edx
push ecx
add eax, ebx
mov ecx, dword [eax + 4]
sub ecx, dword [eax]
push ecx
push dword [ebp - 4]
call fcn.00413c74
add esp, 0xc
mov eax, dword [ebp - 0x1c]
dec eax
cmp dword [ebp - 0x10], eax
jne 0x414c09
mov eax, dword [edi + 0x11c]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + eax + 0xc]
xor edx, edx
div dword [ebp - 8]
test edx, edx
je 0x414c09
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0x108]
lea ecx, [ebx + eax]
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
cmp eax, dword [ebp - 8]
je 0x414cd0
mov ecx, dword [edi + 0x11c]
mov edx, dword [ebp - 0xc]
mov ecx, dword [edx + ecx + 4]
test cx, 0x200
je 0x414c8a
push eax
push dword [ebp - 4]
push dword [ebp - 0x14]
call fcn.004377d0
mov eax, dword [ebp - 0x14]
add esp, 0xc
test byte [eax], 0x34
je 0x414c7b
call fcn.00413d72
mov eax, dword [0x46d664]
test eax, eax
je 0x414cd0
mov ecx, dword [esi + 0x108]
add ebx, ecx
mov ecx, dword [ebx + 4]
sub ecx, dword [ebx]
push ecx
push dword [ebp - 0x14]
lea ecx, [ebp - 0x34]
push ecx
push dword [ebp - 4]
call eax
jmp 0x414cd0
mov eax, dword [esi + 0x108]
add ebx, eax
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
jmp 0x414cc0
test cx, 0x100
je 0x414cd0
mov ecx, dword [ebp - 0x14]
mov byte [ecx], 8
mov eax, dword [esi + 0x108]
add eax, ebx
mov edx, dword [eax + 4]
sub edx, dword [eax]
inc ecx
push edx
push dword [ebp - 4]
push ecx
call fcn.004377d0
mov eax, dword [esi + 0x108]
add ebx, eax
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
add esp, 0xc
inc eax
push eax
push dword [ebp - 0x14]
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 4]
call fcn.004173cb
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x44]
jne 0x414d26
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x38]
cmp dword [ebp + 0x10], eax
mov dword [ebp - 0x4c], eax
jbe 0x414d14
mov ebx, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 4]
add eax, ebx
push eax
push dword [ebp + 0xc]
call fcn.004377d0
mov eax, dword [ebp - 0x4c]
add dword [ebp + 8], eax
mov eax, dword [ebp - 8]
sub eax, ebx
sub ebx, dword [ebp - 8]
add dword [esi + 0x130], eax
add esp, 0xc
add dword [ebp + 0x10], ebx
jmp 0x414d8b
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x38]
push ebx
add eax, ecx
push eax
push dword [ebp + 0xc]
jmp 0x414d76
mov ecx, dword [ebp - 0x20]
dec ecx
cmp eax, ecx
mov ecx, dword [ebp + 8]
jne 0x414d41
mov eax, dword [ebp - 0x3c]
cmp dword [ebp + 0x10], eax
mov eax, dword [ebp + 0xc]
jbe 0x414d6c
mov ebx, dword [ebp - 0x3c]
jmp 0x414d4f
mov eax, dword [ebp - 8]
cmp dword [ebp + 0x10], eax
mov eax, dword [ebp + 0xc]
jbe 0x414d6c
mov ebx, dword [ebp - 8]
push ebx
push dword [ebp - 4]
add ecx, eax
push ecx
call fcn.004377d0
add dword [ebp + 8], ebx
add dword [esi + 0x130], ebx
add esp, 0xc
sub dword [ebp + 0x10], ebx
jmp 0x414d8b
mov ebx, dword [ebp + 0x10]
push ebx
push dword [ebp - 4]
add ecx, eax
push ecx
call fcn.004377d0
add dword [ebp + 8], ebx
add dword [esi + 0x130], ebx
add esp, 0xc
and dword [ebp + 0x10], 0
mov eax, dword [ebp - 0x28]
inc eax
and eax, 0xf
inc dword [ebp - 0x10]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x20]
jb 0x414afe
push dword [ebp - 0x14]
call fcn.004136f6
push dword [ebp - 0x18]
call fcn.004136f6
push dword [ebp - 4]
call fcn.004136f6
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x414dc8
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x41483f
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
jmp 0x41483f
push dword [ebp - 0x14]
call fcn.004136f6
push dword [ebp - 0x18]
call fcn.004136f6
push dword [ebp - 4]
call fcn.004136f6
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x414e02
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x414e19
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
jmp 0x414e19
push 0x57
call dword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x14