Function at 0x4148e9
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 0x414f53
cmp dword [ebp + 0xc], ebx
je 0x414f53
mov eax, dword [esi + 0x128]
cmp eax, 0xffffffff
je 0x41493f
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 0x414f5d
mov edx, dword [ebp + 8]
mov dword [ecx], edx
jmp 0x414f5d
mov edi, dword [ebp + 0x18]
cmp edi, ebx
je 0x41496c
cmp dword [edi], ebx
jne 0x41495e
cmp dword [edi + 4], ebx
jne 0x41495e
cmp dword [edi + 8], ebx
jne 0x41495e
cmp dword [edi + 0xc], ebx
jne 0x41495e
cmp dword [edi + 0x10], ebx
je 0x41496c
push ebx
lea eax, [edi + 0xc]
push eax
push dword [edi + 8]
push esi
call fcn.004138d0
cmp dword [ebp + 0x10], ebx
jne 0x414989
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x41497a
mov dword [eax], ebx
cmp edi, ebx
je 0x414981
mov dword [edi + 4], ebx
xor eax, eax
inc eax
jmp 0x414f5d
mov eax, dword [esi + 0x11c]
mov ebx, dword [esi + 0x130]
mov eax, dword [eax + 0xc]
cmp ebx, eax
mov edi, dword [esi + 0x114]
ja 0x414f5b
jne 0x4149bf
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4149b2
and dword [eax], 0
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x414981
and dword [eax + 4], 0
jmp 0x414981
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 0x4149ea
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 0x414a28
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 0x414a46
inc dword [ebp - 0x1c]
test ecx, ecx
mov dword [ebp - 0x3c], ecx
jne 0x414a50
mov dword [ebp - 0x3c], ebx
push ebx
call fcn.00413f20
test eax, eax
mov dword [ebp - 4], eax
jne 0x414a7b
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x414a67
and dword [eax], 0
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x414f5b
and dword [eax + 4], 0
jmp 0x414f5b
shl ebx, 4
push ebx
call fcn.00413f20
test eax, eax
mov dword [ebp - 0x18], eax
jne 0x414a95
push dword [ebp - 4]
call fcn.00417ab1
jmp 0x414a5d
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.00437ceb
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 0xc
test eax, eax
jne 0x414afa
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 0x414be1
mov eax, dword [ebp - 0x1c]
lea eax, [eax*4 + 4]
push eax
mov dword [ebp - 0x34], eax
call fcn.00413f20
test eax, eax
mov dword [ebp - 0x14], eax
jne 0x414b2e
push dword [ebp - 0x18]
call fcn.00417ab1
jmp 0x414a8b
mov eax, dword [edi + 0x11c]
mov ecx, dword [ebp - 0xc]
add eax, ecx
test word [eax + 4], 0x300
jne 0x414b82
mov edx, dword [ebp - 0x1c]
lea ecx, [edx + 1]
xor eax, eax
test ecx, ecx
jbe 0x414bd8
xor ecx, ecx
cmp eax, edx
jae 0x414b5f
mov ebx, dword [ebp - 0x14]
mov dword [ebx + eax*4], ecx
jmp 0x414b75
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 0x414b53
jmp 0x414bd8
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 0x414bd8
mov eax, dword [ebp - 0x24]
dec eax
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x14]
call fcn.00413db6
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.00413f20
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x414c22
push dword [ebp - 0x18]
call fcn.00417ab1
push dword [ebp - 4]
call fcn.00417ab1
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x414c0f
mov dword [eax], ebx
mov eax, dword [ebp + 0x18]
cmp eax, ebx
je 0x414f5b
mov dword [eax + 4], ebx
jmp 0x414f5b
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 0x414ee6
push 0x10
pop eax
sub eax, dword [ebp - 0x24]
mov dword [ebp - 0x48], eax
xor eax, eax
cmp dword [ebp - 0x28], eax
jne 0x414cc3
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 0x414ca0
mov ecx, dword [eax + ecx*4]
lea edx, [ebp - 0x30]
push edx
jmp 0x414ca8
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 0x414f20
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.004378f0
mov eax, dword [edi + 0x11c]
mov ecx, dword [ebp - 0xc]
add esp, 0xc
test dword [ecx + eax + 4], 0x10000
je 0x414d29
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.00413db6
add esp, 0xc
mov eax, dword [ebp - 0x1c]
dec eax
cmp dword [ebp - 0x10], eax
jne 0x414d4b
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 0x414d4b
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 0x414e12
mov ecx, dword [edi + 0x11c]
mov edx, dword [ebp - 0xc]
mov ecx, dword [edx + ecx + 4]
test cx, 0x200
je 0x414dcc
push eax
push dword [ebp - 4]
push dword [ebp - 0x14]
call fcn.004378f0
mov eax, dword [ebp - 0x14]
add esp, 0xc
test byte [eax], 0x34
je 0x414dbd
call fcn.00413eb4
mov eax, dword [0x46d664]
test eax, eax
je 0x414e12
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 0x414e12
mov eax, dword [esi + 0x108]
add ebx, eax
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
jmp 0x414e02
test cx, 0x100
je 0x414e12
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.004378f0
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.0041750d
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x44]
jne 0x414e68
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x38]
cmp dword [ebp + 0x10], eax
mov dword [ebp - 0x4c], eax
jbe 0x414e56
mov ebx, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 4]
add eax, ebx
push eax
push dword [ebp + 0xc]
call fcn.004378f0
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 0x414ecd
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 0x414eb8
mov ecx, dword [ebp - 0x20]
dec ecx
cmp eax, ecx
mov ecx, dword [ebp + 8]
jne 0x414e83
mov eax, dword [ebp - 0x3c]
cmp dword [ebp + 0x10], eax
mov eax, dword [ebp + 0xc]
jbe 0x414eae
mov ebx, dword [ebp - 0x3c]
jmp 0x414e91
mov eax, dword [ebp - 8]
cmp dword [ebp + 0x10], eax
mov eax, dword [ebp + 0xc]
jbe 0x414eae
mov ebx, dword [ebp - 8]
push ebx
push dword [ebp - 4]
add ecx, eax
push ecx
call fcn.004378f0
add dword [ebp + 8], ebx
add dword [esi + 0x130], ebx
add esp, 0xc
sub dword [ebp + 0x10], ebx
jmp 0x414ecd
mov ebx, dword [ebp + 0x10]
push ebx
push dword [ebp - 4]
add ecx, eax
push ecx
call fcn.004378f0
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 0x414c40
push dword [ebp - 0x14]
call fcn.00417ab1
push dword [ebp - 0x18]
call fcn.00417ab1
push dword [ebp - 4]
call fcn.00417ab1
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x414f0a
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x414981
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
jmp 0x414981
push dword [ebp - 0x14]
call fcn.00417ab1
push dword [ebp - 0x18]
call fcn.00417ab1
push dword [ebp - 4]
call fcn.00417ab1
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x414f44
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x414f5b
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
jmp 0x414f5b
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x14