Function at 0x4166b0
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x463978
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x4895f0]
xor eax, esp
mov dword [esp + 0x64], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4895f0]
xor eax, esp
push eax
lea eax, [esp + 0x7c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x90]
mov ebp, dword [esp + 0x8c]
xor ebx, ebx
mov esi, ecx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x34], eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], ebx
xor edi, edi
mov dword [esp + 0x1c], ebx
call fcn.004294c1
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x416724
push 0x80004005
call fcn.00403400
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x30], eax
cmp dword [esi + 0x2e094], 0x63
mov dword [esp + 0x84], ebx
jge 0x4169af
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push 0x80
push ebp
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
push ebx
push 3
push ebx
push 1
push SysReAllocStringLen
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x416784
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4169ad
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
test ebp, ebp
je 0x4169a2
cmp ebp, 0x130
jb 0x4169a2
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4169a2
cmp eax, ebp
jae 0x4169a2
push 0
lea ecx, [esp + 0x1c]
push ecx
push 0x40
lea edx, [esp + 0x44]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4169a2
mov ax, word [esp + 0x38]
cmp ax, 0x4d5a
je 0x4167ef
cmp ax, 0x5a4d
jne 0x4167fb
cmp ebp, 0x3ff
jb 0x4169a2
mov eax, ebp
test eax, eax
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
jge 0x41680f
fadd qword [0x46dd00]
fmul qword [0x46dcf8]
push ebp
fnstcw word [esp + 0x18]
movzx eax, word [esp + 0x18]
or eax, 0xc00
mov dword [esp + 0x2c], eax
fldcw word [esp + 0x2c]
fistp qword [esp + 0x2c]
mov ecx, dword [esp + 0x2c]
fldcw word [esp + 0x18]
mov dword [esp + 0x18], ecx
call fcn.004282da
mov edi, eax
add esp, 4
test edi, edi
je 0x4169a2
mov edx, dword [esp + 0x14]
push 0
push 0
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4169a2
cmp eax, ebp
jae 0x4169a2
push 0
lea eax, [esp + 0x1c]
push eax
push 0x10
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4169a2
mov ecx, dword [esi + 0x2e094]
mov edx, dword [esp + 0x14]
imul ecx, ecx, 0x517
mov dword [ecx + esi + 0xe39c], edx
mov eax, dword [esi + 0x2e094]
imul eax, eax, 0x517
mov dword [eax + esi + 0xe3a0], 0x10
mov ecx, dword [esi + 0x2e094]
mov edx, dword [edi]
imul ecx, ecx, 0x517
lea eax, [ecx + esi + 0xe3a4]
mov dword [eax], edx
mov ecx, dword [edi + 4]
mov dword [eax + 4], ecx
mov edx, dword [edi + 8]
push 0
push 0
mov dword [eax + 8], edx
mov ecx, dword [edi + 0xc]
push 0
push ebx
mov dword [eax + 0xc], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4169a2
cmp eax, ebp
jae 0x4169a2
push 0
lea edx, [esp + 0x1c]
push edx
push ebp
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4169a2
mov eax, dword [esi + 0x2e094]
imul eax, eax, 0x517
mov dword [eax + esi + 0xe4a3], 0
mov ecx, dword [esi + 0x2e094]
imul ecx, ecx, 0x517
push ebp
mov dword [ecx + esi + 0xe4a7], ebp
push edi
lea ecx, [esi + 0x2e098]
call fcn.0040cd60
mov edx, dword [esi + 0x2e094]
imul edx, edx, 0x517
mov dword [edx + esi + 0xe4ab], eax
mov eax, dword [esi + 0x2e094]
mov ecx, dword [esp + 0x34]
imul eax, eax, 0x517
lea eax, [eax + esi + 0xe398]
mov ebp, 1
or dword [eax], ebp
mov edx, dword [esi + 0x2e094]
imul edx, edx, 0x517
push ecx
lea eax, [edx + esi + 0xe4af]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add dword [esi + 0x2e094], ebp
mov dword [esp + 0x20], ebp
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [esp + 0x24]
xor ebx, ebx
mov ecx, dword [esp + 0x1c]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
cmp edi, ebx
je 0x4169c8
push edi
call fcn.004282df
add esp, 4
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov dword [esp + 0x84], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4169f3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x7c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.0044ce74
add esp, 0x74
ret 8