Function at 0x405f60
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x480
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push edi
push 0
push 0x80
push 3
push 0
push 3
push connect
push ecx
mov edi, edx
mov dword [ebp - 0x480], eax
call esi
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4062d5
test ebx, ebx
je 0x4062d5
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
push edi
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x4062b8
test edi, edi
je 0x4062b8
push 0x2e
xorps xmm0, xmm0
lea eax, [ebp - 0x478]
push 0
push eax
movq qword [ebp - 0x448], xmm0
movq qword [ebp - 0x440], xmm0
movq qword [ebp - 0x438], xmm0
mov dword [ebp - 0x430], 0
mov word [ebp - 0x42c], 0
call fcn.00409b80
xorps xmm0, xmm0
xor eax, eax
add esp, 0xc
lea edx, [ebp - 0x43c]
lea ecx, [ebp - 0x43e]
movq qword [ebp - 0x428], xmm0
movq qword [ebp - 0x420], xmm0
mov dword [ebp - 0x418], 0
mov word [ebp - 0x414], 0
mov dword [ebp - 0x448], 0x4034b50
mov dword [ebp - 0x444], 0xa
mov dword [ebp - 0x472], 0xa
mov word [ebp - 0x440], ax
mov word [ebp - 0x46e], ax
call fcn.00405cf0
movzx eax, word [ebp - 0x43e]
mov word [ebp - 0x46c], ax
movzx eax, word [ebp - 0x43c]
mov ecx, ebx
mov word [ebp - 0x46a], ax
call fcn.00405db0
mov esi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push ebx
mov dword [ebp - 0x43a], eax
mov dword [ebp - 0x468], eax
call esi
mov dword [ebp - 0x436], eax
push 0
push ebx
mov dword [ebp - 0x464], eax
call esi
push dword [ebp - 0x480]
mov dword [ebp - 0x432], eax
mov dword [ebp - 0x460], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov word [ebp - 0x42e], ax
mov word [ebp - 0x45c], ax
xor eax, eax
push eax
mov word [ebp - 0x42c], ax
mov word [ebp - 0x45a], ax
mov dword [ebp - 0x44e], eax
lea eax, [ebp - 0x410]
push eax
push 0x1e
lea eax, [ebp - 0x448]
push eax
push edi
call esi
push 0
lea eax, [ebp - 0x410]
push eax
push dword [ebp - 0x480]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push dword [ebp - 0x480]
push edi
call esi
push dword [ebp - 0x480]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
push 0
push 0
push ebx
lea esi, [eax + 0x1e]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x410], 0
push 0
lea eax, [ebp - 0x410]
push eax
push 0x400
lea eax, [ebp - 0x40c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4061d5
mov eax, dword [ebp - 0x410]
test eax, eax
je 0x4061d5
push 0
lea ecx, [ebp - 0x47c]
push ecx
push eax
lea eax, [ebp - 0x40c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
add esi, dword [ebp - 0x410]
push 0
lea eax, [ebp - 0x410]
push eax
push 0x400
lea eax, [ebp - 0x40c]
push eax
push ebx
mov dword [ebp - 0x410], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406183
mov eax, 0x14
mov word [ebp - 0x474], ax
xor eax, eax
push eax
mov word [ebp - 0x454], ax
lea eax, [ebp - 0x410]
push eax
push 0x2e
lea eax, [ebp - 0x478]
push eax
push edi
mov dword [ebp - 0x418], esi
mov dword [ebp - 0x478], 0x2014b50
mov dword [ebp - 0x452], 0x20
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x410]
push eax
push dword [ebp - 0x480]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push dword [ebp - 0x480]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x480]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 0x2e
add eax, esi
sub eax, dword [ebp - 0x418]
xor ecx, ecx
mov dword [ebp - 0x41c], eax
xor eax, eax
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x410]
push eax
push 0x16
lea eax, [ebp - 0x428]
push eax
push edi
mov dword [ebp - 0x428], 0x6054b50
mov dword [ebp - 0x424], ecx
mov dword [ebp - 0x420], 0x10001
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push ebx
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004062eb
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004062eb
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.004062eb
mov esp, ebp
pop ebp
ret