Function at 0x405200
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46a1d5
mov eax, dword fs:[0]
push eax
sub esp, 0x74
mov eax, dword [0x4ab7b4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, 0x48e7d0
mov dword [ebp - 0x40], 0x48e948
test ecx, ecx
mov dword [ebp - 0x18], 0x48e950
mov esi, edi
cmovne esi, ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
test esi, esi
mov dword [ebp - 4], 0
xorps xmm0, xmm0
mov dword [ebp - 0x2c], 0
cmovne edi, esi
mov dword [ebp - 0x28], 0
mov ecx, edi
movups xmmword [ebp - 0x3c], xmm0
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405273
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x3c]
call fcn.00409080
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov eax, dword [eax + 4]
push dword [ebp + eax - 0x18]
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], 1
call fcn.00404da0
add eax, 4
cmp dword [eax + 0x14], 8
jb 0x4052cb
mov eax, dword [eax]
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
lea edi, [ebp - 0x48]
mov eax, dword [ebp - 0x48]
add edi, dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push dword [ebp - 0x54]
call fcn.00443fbc
add esp, 4
push dword [ebp - 0x4c]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [ebp - 0x58], 8
jb 0x40531a
push dword [ebp - 0x6c]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
xor eax, eax
mov dword [ebp - 0x5c], 0
mov word [ebp - 0x6c], ax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x58], 7
mov eax, dword [eax + 4]
push dword [ebp + eax - 0x70]
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp byte [0x4b14ad], 0
jne 0x4053b1
xor eax, eax
push eax
push eax
push eax
push esi
mov word [ebp - 0x74], ax
mov dword [ebp - 0x7c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x7c]
push eax
push 2
lea eax, [ebp - 0x74]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, 0xfeff
test eax, eax
je 0x40538a
cmp dword [ebp - 0x7c], 2
jne 0x40538a
cmp word [ebp - 0x74], cx
sete al
mov byte [0x4b14ad], al
jmp 0x40538f
mov al, byte [0x4b14ad]
test al, al
jne 0x4053aa
push 0
lea eax, [ebp - 0x80]
mov word [ebp - 0x78], cx
push eax
push 2
lea eax, [ebp - 0x78]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov byte [0x4b14ad], 1
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x28], 8
lea eax, [ebp - 0x80]
push 0
push eax
mov eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x3c]
cmovae ecx, dword [ebp - 0x3c]
add eax, eax
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test esi, esi
je 0x4053f1
cmp dword [sym.imp.KERNEL32.dll_CloseHandle], 0
je 0x4053f1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
lea esi, [ebp - 0x18]
add esi, dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
push dword [ebp - 0x24]
call fcn.00443fbc
add esp, 4
push dword [ebp - 0x1c]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [ebp - 0x28], 8
jb 0x405425
push dword [ebp - 0x3c]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
xor eax, eax
mov dword [ebp - 0x2c], 0
mov word [ebp - 0x3c], ax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x28], 7
mov eax, dword [eax + 4]
push dword [ebp + eax - 0x40]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00443e8b
mov esp, ebp
pop ebp
ret