Function at 0x414c40
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x1c
push ebx
mov ebx, dword [esp + 0x24]
push ebp
push esi
mov ebp, dword [ebx + 0x1060]
mov esi, dword [ebx + 0x14]
test ebp, ebp
push edi
mov dword [esp + 0x10], esi
jne 0x414c67
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret
test esi, esi
jne 0x414c76
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret
mov eax, dword [ebx]
test eax, eax
je 0x414c8c
cmp dword [eax], 0
jne 0x414c8c
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret
mov eax, dword [0x697f9c]
mov ecx, dword [0x697fa0]
inc eax
and eax, 7
cmp eax, ecx
jne 0x414caa
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret
mov ecx, dword [esi]
lea edx, [esp + 0x14]
push edx
push esi
call dword [ecx + 0x24]
test byte [esp + 0x14], 2
je 0x414cdb
mov eax, dword [esi]
push esi
call dword [eax + 0x50]
test eax, eax
je 0x414cd1
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret
mov dword [0x697fac], 1
mov eax, dword [ebx + 0x106c]
mov ecx, dword [ebx + 0x20]
cmp eax, ecx
jb 0x414d4f
mov edx, dword [0x697fa8]
push 0
shr ecx, 2
mov edi, ecx
lea ecx, [esp + 0x34]
push ecx
push edi
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x414d12
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret
cmp dword [esp + 0x30], edi
je 0x414d23
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret
mov eax, dword [0x697fa4]
mov ecx, dword [0x697fa8]
push edi
push eax
push ecx
call fcn.004151dd
mov edx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x106c]
add esp, 0xc
sub eax, edx
mov dword [ebx + 0x106c], eax
jmp 0x414e4b
mov ecx, dword [0x697fa8]
push 0
shr eax, 2
mov esi, eax
lea eax, [esp + 0x34]
push eax
push esi
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x414d79
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret
cmp dword [esp + 0x30], esi
je 0x414d8a
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret
mov edx, dword [0x697fa4]
mov eax, dword [0x697fa8]
push esi
push edx
push eax
call fcn.004151dd
add esp, 0xc
call fcn.004151b0
mov ecx, dword [ebx + 0x1064]
push 0
push 0
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x414dc6
pop edi
pop esi
pop ebp
or eax, eax
pop ebx
add esp, 0x1c
ret
mov eax, dword [ebx + 0x106c]
mov edx, dword [0x697fa4]
mov edi, dword [ebx + 0x20]
push 0
sub edi, eax
lea ecx, [eax + edx]
mov edx, dword [ebx + 0x1068]
mov esi, edi
lea eax, [esp + 0x34]
mov dword [esp + 0x1c], ecx
mov dword [ebx + 0x106c], edx
mov ecx, dword [0x697fa8]
shr esi, 2
push eax
push esi
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x414e14
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret
cmp dword [esp + 0x30], esi
je 0x414e25
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret
mov edx, dword [esp + 0x18]
mov eax, dword [0x697fa8]
push esi
push edx
push eax
call fcn.004151dd
mov eax, dword [ebx + 0x106c]
mov esi, dword [esp + 0x1c]
add esp, 0xc
sub eax, edi
mov dword [ebx + 0x106c], eax
mov eax, dword [ebx + 0x106c]
test eax, eax
jne 0x414e87
call fcn.004151b0
mov ecx, dword [ebx + 0x1064]
push 0
push 0
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x414e7b
pop edi
pop esi
pop ebp
or eax, eax
pop ebx
add esp, 0x1c
ret
mov edx, dword [ebx + 0x1068]
mov dword [ebx + 0x106c], edx
lea edx, [esp + 0x20]
push 0
mov eax, dword [ebx + 0x1c]
push edx
lea edx, [esp + 0x30]
mov ecx, dword [esi]
push edx
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x34]
push edx
push eax
imul eax, dword [0x697f9c]
push eax
push esi
call dword [ecx + 0x2c]
test eax, eax
je 0x414ebe
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret
mov ebp, dword [0x697fa4]
xor edx, edx
mov edi, dword [esp + edx + 0x24]
test edi, edi
je 0x414ef7
mov ecx, dword [esp + edx + 0x1c]
test ecx, ecx
je 0x414ef7
mov eax, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + edx + 0x1c]
mov ecx, dword [ebx + 0x1c]
cmp eax, ecx
jae 0x414ef3
add ebp, eax
mov esi, dword [esp + 0x10]
add edx, 4
cmp edx, 8
jl 0x414ec6
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
mov ecx, dword [esi]
push edx
mov edx, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x2c]
push edx
push eax
push esi
call dword [ecx + 0x4c]
mov eax, dword [0x697fac]
test eax, eax
je 0x414f38
mov ecx, dword [esi]
push 1
push 0
push 0
push esi
call dword [ecx + 0x30]
mov dword [0x697fac], 0
mov edx, dword [0x697f9c]
pop edi
inc edx
pop esi
and edx, 7
pop ebp
mov dword [0x697f9c], edx
xor eax, eax
pop ebx
add esp, 0x1c
ret