Function at 0x405760
Capabilities:
Check if file exists
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41befd
mov eax, dword fs:[0]
push eax
sub esp, 0x444
mov eax, dword [0x42a040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x428], ecx
mov dword [ebp - 4], 0
lea ecx, [ebp + 0x2c]
call fcn.004042c0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4057be
lea ecx, [ebp + 0x44]
call fcn.004042c0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4057e2
mov dword [ebp - 0x43c], 5
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00402ab0
mov eax, dword [ebp - 0x43c]
jmp 0x405a93
mov ecx, dword [ebp - 0x428]
call fcn.00405ed0
mov dword [ebp - 0x42c], eax
cmp dword [ebp - 0x42c], 0
jne 0x405820
mov dword [ebp - 0x440], 2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00402ab0
mov eax, dword [ebp - 0x440]
jmp 0x405a93
push 0
push 0
push 0
push 4
mov eax, dword [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x430], eax
cmp dword [ebp - 0x430], 0
jne 0x405875
mov ecx, dword [ebp - 0x42c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x444], 2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00402ab0
mov eax, dword [ebp - 0x444]
jmp 0x405a93
mov ecx, dword [ebp - 0x428]
call fcn.00405f90
add eax, dword [ebp - 0x430]
mov dword [ebp - 0x438], eax
mov dword [ebp - 0x434], 0
push 0x208
push 0
lea edx, [ebp - 0x420]
push edx
call fcn.0040fb70
add esp, 0xc
mov dword [ebp - 0x424], 0
jmp 0x4058c7
mov eax, dword [ebp - 0x424]
add eax, 1
mov dword [ebp - 0x424], eax
cmp dword [ebp - 0x424], 0xe
jg 0x405a58
cmp dword [ebp - 0x424], 1
jne 0x4058ec
mov ecx, dword [ebp - 0x428]
call fcn.00405440
test eax, eax
je 0x40590a
cmp dword [ebp - 0x424], 5
jne 0x4058fb
cmp dword [ebp + 0x5c], 1
je 0x40590a
cmp dword [ebp - 0x424], 5
jle 0x40590c
cmp dword [ebp + 8], 0
je 0x40590c
jmp 0x4058b8
cmp dword [ebp + 0x60], 0
je 0x4059ad
mov ecx, dword [str.ck_W_e]
mov dword [ebp - 0x218], ecx
mov edx, dword [0x4233b8]
mov dword [ebp - 0x214], edx
mov eax, dword [0x4233bc]
mov dword [ebp - 0x210], eax
mov ecx, dword [0x4233c0]
mov dword [ebp - 0x20c], ecx
push 0x1f8
push 0
lea edx, [ebp - 0x208]
push edx
call fcn.0040fb70
add esp, 0xc
cmp dword [ebp + 8], 0
je 0x405973
push 0x4233c4
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ecx, dword [ebp - 0x424]
mov edx, dword [ecx*4 + 0x423df8]
push edx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x4233d4
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea edx, [ebp - 0x218]
push edx
call dword [ebp + 0x60]
add esp, 4
lea ecx, [ebp + 0x2c]
call fcn.004042c0
push eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp dword [ebp - 0x424], 5
jle 0x4059e2
lea ecx, [ebp + 0x44]
call fcn.004042c0
push eax
lea ecx, [ebp - 0x420]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov edx, dword [ebp - 0x424]
mov eax, dword [edx*4 + 0x423df8]
push eax
lea ecx, [ebp - 0x420]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edx, dword [ebp - 0x424]
mov eax, dword [ebp - 0x438]
mov ecx, dword [eax + edx*8]
mov edx, dword [eax + edx*8 + 4]
mov dword [ebp - 0x450], ecx
mov dword [ebp - 0x44c], edx
mov eax, dword [ebp - 0x44c]
push eax
mov ecx, dword [ebp - 0x438]
add ecx, dword [ebp - 0x450]
push ecx
lea edx, [ebp - 0x420]
push edx
mov ecx, dword [ebp - 0x428]
call fcn.00406000
mov dword [ebp - 0x434], eax
cmp dword [ebp - 0x434], 0
je 0x405a53
jmp 0x405a58
jmp 0x4058b8
mov eax, dword [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp - 0x42c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x434]
mov dword [ebp - 0x448], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00402ab0
mov eax, dword [ebp - 0x448]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040e852
mov esp, ebp
pop ebp
ret 0x5c