Function at 0x4069e0
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x424a69
push eax
mov dword fs:[0], esp
sub esp, 0x58
push ebp
mov ebp, ecx
mov eax, dword [ebp + 0x34]
test eax, eax
jne 0x406a07
mov eax, 0x426230
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x406a24
xor al, al
pop ebp
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
add esp, 0x64
ret
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov esi, dword [ebx + 4]
mov edi, dword [esi]
cmp edi, esi
je 0x406a48
mov eax, edi
mov edi, dword [edi]
push eax
lea eax, [esp + 0x28]
push eax
mov ecx, ebx
call fcn.004071e0
cmp edi, esi
jne 0x406a33
mov eax, dword [ebp + 0x34]
mov byte [esp + 0x13], 0
test eax, eax
mov dword [esp + 0x14], 0
jne 0x406a61
mov eax, 0x426230
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0x2c], eax
je 0x406d54
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp + 0x2c]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push 0
push 0xfffffffffffffffc
push ecx
mov dword [esp + 0x2c], eax
call ebx
mov eax, dword [ebp + 0x2c]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x14]
push 0
lea edi, [ebp + 0x28]
push edx
push 4
push edi
push eax
call esi
test eax, eax
je 0x406d54
mov edi, dword [edi]
test edi, edi
jbe 0x406d54
cmp edi, dword [esp + 0x1c]
jae 0x406d54
lea ecx, [esp + 0x2c]
call fcn.00406560
mov edx, dword [ebp + 0x2c]
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x28]
xor edi, edi
push edi
push edi
push ecx
push edx
call ebx
mov edx, dword [ebp + 0x2c]
lea eax, [esp + 0x14]
push edi
push eax
lea ecx, [esp + 0x34]
push 0x18
push ecx
push edx
call esi
test eax, eax
je 0x406d54
cmp dword [esp + 0x14], 0x18
jne 0x406d54
cmp dword [esp + 0x2c], 0x53d4bb5
jne 0x406d54
cmp dword [esp + 0x30], 0xa4934b6f
jne 0x406d54
cmp dword [esp + 0x34], 0x9fb4d7b4
jne 0x406d54
cmp dword [esp + 0x38], 0x497e36db
jne 0x406d54
mov eax, dword [esp + 0x40]
cmp eax, edi
jbe 0x406d54
cmp eax, dword [esp + 0x1c]
jae 0x406d54
push edi
push edi
push eax
mov eax, dword [ebp + 0x2c]
push eax
mov dword [esp + 0x28], edi
call ebx
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x1c], edi
cmp eax, edi
jbe 0x406d24
jmp 0x406b9f
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
xor edi, edi
lea ecx, [esp + 0x44]
call fcn.00406590
mov eax, dword [ebp + 0x2c]
lea ecx, [esp + 0x14]
push edi
push ecx
lea edx, [esp + 0x4c]
push 0x14
push edx
push eax
mov dword [esp + 0x84], edi
call esi
mov ecx, dword [ebp + 0x2c]
push 1
push edi
push edi
push ecx
call ebx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x2c]
push edi
add edx, 0xfffffffc
push edi
push edx
push eax
call ebx
mov eax, dword [ebp + 0x2c]
lea ecx, [esp + 0x14]
push edi
push ecx
lea edx, [esp + 0x20]
push 4
push edx
push eax
call esi
mov eax, dword [esp + 0x18]
cmp eax, 0x104
jae 0x406d2b
push eax
call fcn.00419194
mov edx, dword [esp + 0x1c]
add esp, 4
lea ecx, [esp + 0x14]
mov ebx, eax
mov eax, dword [ebp + 0x2c]
push 0
push ecx
push edx
push ebx
push eax
call esi
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
lea ecx, [esp + 0x5c]
push edi
mov dword [esp + 0x28], edi
call fcn.00402ca0
test al, al
je 0x406c66
mov ecx, edi
mov edi, dword [esp + 0x5c]
mov edx, ecx
mov esi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x60], eax
mov byte [ecx + eax], 0
push ebx
call fcn.0040c880
mov ebx, dword [ebp + 0xc]
push 0x2c
mov edi, dword [ebx + 4]
mov esi, dword [edi + 4]
call fcn.00419194
add esp, 8
mov ecx, edi
test edi, edi
jne 0x406c87
mov ecx, eax
test esi, esi
mov dword [eax], ecx
jne 0x406c8f
mov esi, eax
mov dword [eax + 4], esi
mov dword [edi + 4], eax
mov ecx, dword [eax + 4]
mov dword [ecx], eax
add eax, 8
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], eax
test eax, eax
mov byte [esp + 0x70], 1
je 0x406cba
lea edx, [esp + 0x44]
mov ecx, eax
push edx
call fcn.00407220
mov eax, dword [ebx + 8]
push 0
inc eax
push 0
mov dword [ebx + 8], eax
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebp + 0x2c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x5c]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x70], 0xffffffff
je 0x406d03
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x406cfa
cmp al, 0xff
je 0x406cfa
dec al
mov byte [ecx], al
jmp 0x406d03
push ecx
call fcn.0040c880
add esp, 4
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x3c]
inc eax
mov dword [esp + 0x5c], esi
cmp eax, ecx
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], esi
mov dword [esp + 0x1c], eax
jb 0x406b91
mov byte [esp + 0x13], 1
jmp 0x406d54
mov eax, dword [esp + 0x5c]
cmp eax, edi
je 0x406d45
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x406d81
cmp al, 0xff
je 0x406d81
dec al
mov byte [ecx], al
xor eax, eax
cmp eax, edi
je 0x406d54
push eax
call fcn.0040c880
add esp, 4
mov eax, dword [ebp + 0x2c]
pop edi
pop esi
cmp eax, 0xffffffff
pop ebx
je 0x406d6d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x2c], 0xffffffff
mov ecx, dword [esp + 0x5c]
mov al, byte [esp + 7]
pop ebp
mov dword fs:[0], ecx
add esp, 0x64
ret
push ecx
call fcn.0040c880
add esp, 4
jmp 0x406d45