Function at 0x595160
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x60bd4c
mov eax, dword fs:[0]
push eax
sub esp, 0x54
push ebx
push esi
push edi
mov eax, dword [0x667710]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp + 8]
test eax, eax
je 0x5953da
cmp word [eax], 0
je 0x5953da
xorps xmm0, xmm0
mov dword [ebp - 0x60], 0xffffffff
movlpd qword [ebp - 0x58], xmm0
mov dword [ebp - 0x50], 0x1000
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
sub esp, 0x10
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x60]
push eax
call fcn.00430f09
mov ebx, dword [ebp - 0x34]
test eax, eax
mov eax, dword [ebp - 0x40]
mov esi, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x60]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x18], eax
je 0x595297
test ebx, ebx
je 0x595228
mov eax, dword [ebp - 0x38]
jmp 0x59527c
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, eax
cmp edx, 0xffffffff
jne 0x595248
or eax, eax
mov dword [ebp - 0x24], edx
jmp 0x59527c
mov ecx, dword [ebp + 8]
xor eax, eax
or eax, edx
cmp dword [ebp - 0x40], 0
je 0x59527c
test esi, esi
je 0x59527c
mov edx, dword [ebp - 0x44]
add edx, dword [ebp - 0x58]
mov ebx, dword [ebp - 0x54]
mov dword [ebp + 8], 0
adc dword [ebp + 8], ebx
mov ebx, dword [ebp - 0x34]
cmp ecx, dword [ebp + 8]
ja 0x59527c
jb 0x59527a
cmp eax, edx
ja 0x59527c
mov eax, edx
test ebx, ebx
je 0x595297
cmp eax, 0x10
jb 0x595297
push dword [ebp + 0xc]
mov ecx, dword [ebp - 0x20]
push eax
push ebx
call fcn.00592f80
mov dword [ebp - 0x20], eax
jmp 0x59529e
mov dword [ebp - 0x20], 0
test ebx, ebx
je 0x5952a9
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x40], 0
je 0x59531b
test esi, esi
je 0x595314
mov ebx, dword [ebp - 0x44]
test ebx, ebx
je 0x595314
mov eax, dword [ebp - 0x54]
push 0
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
push dword [ebp - 0x58]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x59531b
xor edx, edx
or edx, eax
and edx, dword [ebp + 8]
cmp edx, 0xffffffff
je 0x59531b
push 0
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x59531b
mov eax, dword [ebp - 0x58]
add eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x54]
adc eax, 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], 0
test esi, esi
je 0x595335
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor esi, esi
xor ebx, ebx
jmp 0x595338
mov ebx, dword [ebp - 0x10]
cmp edi, 0xffffffff
je 0x595357
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xorps xmm0, xmm0
or edi, 0xffffffff
movlpd qword [ebp - 0x58], xmm0
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x58]
jmp 0x59535d
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
cmp dword [ebp - 0x1c], 0
je 0x5953a3
test esi, esi
je 0x5953b7
test ebx, ebx
je 0x5953a3
push 0
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x5953a3
xor edx, edx
or edx, eax
and edx, dword [ebp + 8]
cmp edx, 0xffffffff
je 0x5953a3
push 0
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test esi, esi
je 0x5953b7
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp edi, 0xffffffff
je 0x5953c3
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8