Function at 0x414916
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 0x414f80
cmp dword [ebp + 0xc], ebx
je 0x414f80
mov eax, dword [esi + 0x128]
cmp eax, 0xffffffff
je 0x41496c
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 0x414f8a
mov edx, dword [ebp + 8]
mov dword [ecx], edx
jmp 0x414f8a
mov edi, dword [ebp + 0x18]
cmp edi, ebx
je 0x414999
cmp dword [edi], ebx
jne 0x41498b
cmp dword [edi + 4], ebx
jne 0x41498b
cmp dword [edi + 8], ebx
jne 0x41498b
cmp dword [edi + 0xc], ebx
jne 0x41498b
cmp dword [edi + 0x10], ebx
je 0x414999
push ebx
lea eax, [edi + 0xc]
push eax
push dword [edi + 8]
push esi
call fcn.0041391e
cmp dword [ebp + 0x10], ebx
jne 0x4149b6
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x4149a7
mov dword [eax], ebx
cmp edi, ebx
je 0x4149ae
mov dword [edi + 4], ebx
xor eax, eax
inc eax
jmp 0x414f8a
mov eax, dword [esi + 0x11c]
mov ebx, dword [esi + 0x130]
mov eax, dword [eax + 0xc]
cmp ebx, eax
mov edi, dword [esi + 0x114]
ja 0x414f88
jne 0x4149ec
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4149df
and dword [eax], 0
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x4149ae
and dword [eax + 4], 0
jmp 0x4149ae
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 0x414a17
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 0x414a55
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 0x414a73
inc dword [ebp - 0x1c]
test ecx, ecx
mov dword [ebp - 0x3c], ecx
jne 0x414a7d
mov dword [ebp - 0x3c], ebx
push ebx
call fcn.00417b53
test eax, eax
mov dword [ebp - 4], eax
jne 0x414aa8
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x414a94
and dword [eax], 0
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x414f88
and dword [eax + 4], 0
jmp 0x414f88
shl ebx, 4
push ebx
call fcn.00417b53
test eax, eax
mov dword [ebp - 0x18], eax
jne 0x414ac2
push dword [ebp - 4]
call fcn.00413886
jmp 0x414a8a
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.00437d5b
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 0xc
test eax, eax
jne 0x414b27
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 0x414c0e
mov eax, dword [ebp - 0x1c]
lea eax, [eax*4 + 4]
push eax
mov dword [ebp - 0x34], eax
call fcn.00417b53
test eax, eax
mov dword [ebp - 0x14], eax
jne 0x414b5b
push dword [ebp - 0x18]
call fcn.00413886
jmp 0x414ab8
mov eax, dword [edi + 0x11c]
mov ecx, dword [ebp - 0xc]
add eax, ecx
test word [eax + 4], 0x300
jne 0x414baf
mov edx, dword [ebp - 0x1c]
lea ecx, [edx + 1]
xor eax, eax
test ecx, ecx
jbe 0x414c05
xor ecx, ecx
cmp eax, edx
jae 0x414b8c
mov ebx, dword [ebp - 0x14]
mov dword [ebx + eax*4], ecx
jmp 0x414ba2
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 0x414b80
jmp 0x414c05
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 0x414c05
mov eax, dword [ebp - 0x24]
dec eax
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x14]
call fcn.00413e04
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.00417b53
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x414c4f
push dword [ebp - 0x18]
call fcn.00413886
push dword [ebp - 4]
call fcn.00413886
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x414c3c
mov dword [eax], ebx
mov eax, dword [ebp + 0x18]
cmp eax, ebx
je 0x414f88
mov dword [eax + 4], ebx
jmp 0x414f88
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 0x414f13
push 0x10
pop eax
sub eax, dword [ebp - 0x24]
mov dword [ebp - 0x48], eax
xor eax, eax
cmp dword [ebp - 0x28], eax
jne 0x414cf0
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 0x414ccd
mov ecx, dword [eax + ecx*4]
lea edx, [ebp - 0x30]
push edx
jmp 0x414cd5
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 0x414f4d
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.00437960
mov eax, dword [edi + 0x11c]
mov ecx, dword [ebp - 0xc]
add esp, 0xc
test dword [ecx + eax + 4], 0x10000
je 0x414d56
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.00413e04
add esp, 0xc
mov eax, dword [ebp - 0x1c]
dec eax
cmp dword [ebp - 0x10], eax
jne 0x414d78
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 0x414d78
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 0x414e3f
mov ecx, dword [edi + 0x11c]
mov edx, dword [ebp - 0xc]
mov ecx, dword [edx + ecx + 4]
test cx, 0x200
je 0x414df9
push eax
push dword [ebp - 4]
push dword [ebp - 0x14]
call fcn.00437960
mov eax, dword [ebp - 0x14]
add esp, 0xc
test byte [eax], 0x34
je 0x414dea
call fcn.00413f02
mov eax, dword [0x46d664]
test eax, eax
je 0x414e3f
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 0x414e3f
mov eax, dword [esi + 0x108]
add ebx, eax
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
jmp 0x414e2f
test cx, 0x100
je 0x414e3f
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.00437960
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.0041753a
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x44]
jne 0x414e95
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x38]
cmp dword [ebp + 0x10], eax
mov dword [ebp - 0x4c], eax
jbe 0x414e83
mov ebx, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 4]
add eax, ebx
push eax
push dword [ebp + 0xc]
call fcn.00437960
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 0x414efa
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 0x414ee5
mov ecx, dword [ebp - 0x20]
dec ecx
cmp eax, ecx
mov ecx, dword [ebp + 8]
jne 0x414eb0
mov eax, dword [ebp - 0x3c]
cmp dword [ebp + 0x10], eax
mov eax, dword [ebp + 0xc]
jbe 0x414edb
mov ebx, dword [ebp - 0x3c]
jmp 0x414ebe
mov eax, dword [ebp - 8]
cmp dword [ebp + 0x10], eax
mov eax, dword [ebp + 0xc]
jbe 0x414edb
mov ebx, dword [ebp - 8]
push ebx
push dword [ebp - 4]
add ecx, eax
push ecx
call fcn.00437960
add dword [ebp + 8], ebx
add dword [esi + 0x130], ebx
add esp, 0xc
sub dword [ebp + 0x10], ebx
jmp 0x414efa
mov ebx, dword [ebp + 0x10]
push ebx
push dword [ebp - 4]
add ecx, eax
push ecx
call fcn.00437960
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 0x414c6d
push dword [ebp - 0x14]
call fcn.00413886
push dword [ebp - 0x18]
call fcn.00413886
push dword [ebp - 4]
call fcn.00413886
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x414f37
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x4149ae
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
jmp 0x4149ae
push dword [ebp - 0x14]
call fcn.00413886
push dword [ebp - 0x18]
call fcn.00413886
push dword [ebp - 4]
call fcn.00413886
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x414f71
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x414f88
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
jmp 0x414f88
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x14