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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4de3b0
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x526a28]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
xor edi, edi
mov ebx, ecx
mov cx, word [ebx]
push edi
push edi
mov dword [ebp - 0x2c], eax
mov word [ebp - 0x28], cx
mov edx, 0x3a
xor eax, eax
lea ecx, [ebp - 0x4c]
mov word [ebp - 0x26], dx
push ecx
lea edx, [ebp - 0x54]
mov word [ebp - 0x24], ax
push edx
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x74], edi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
jne 0x405912
xor eax, eax
jmp 0x405b29
mov esi, dword [ebp - 0x54]
imul esi, dword [ebp - 0x4c]
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 0x48]
push edx
push esi
mov eax, ebx
call fcn.00405710
add esp, 0xc
mov dword [ebp - 0x3c], eax
cmp eax, edi
je 0x40590b
mov eax, dword [ebp - 0x30]
push edi
push edi
mov ecx, 0x5c
mov edx, ecx
push 3
push edi
mov word [ebp - 0x26], dx
mov dx, word [ebx]
mov dword [ebp - 0x84], eax
push 3
mov eax, 0x2e
mov word [ebp - 0x20], dx
mov word [ebp - 0x28], cx
mov word [ebp - 0x24], ax
mov word [ebp - 0x22], cx
push SysReAllocStringLen
lea edx, [ebp - 0x28]
mov eax, 0x3a
xor ecx, ecx
mov dword [ebp - 4], edi
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push edx
mov word [ebp - 0x1e], ax
mov word [ebp - 0x1c], cx
call ebx
mov dword [ebp - 0x38], eax
cmp eax, 0xffffffff
jne 0x4059a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x58], eax
push 0x520914
lea eax, [ebp - 0x58]
push eax
call fcn.0043615f
mov ecx, dword [ebp - 0x2c]
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
push ecx
call ebx
mov dword [ebp - 0x34], eax
cmp eax, 0xffffffff
jne 0x4059dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x520914
lea edx, [ebp - 0x60]
push edx
mov dword [ebp - 0x60], eax
call fcn.0043615f
push esi
call fcn.00433afb
mov ebx, eax
add esp, 4
mov dword [ebp - 0x44], ebx
lea ebx, [ebx]
cmp edi, dword [ebp - 0x48]
jae 0x405aeb
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax + edi*8 + 4]
mov edx, dword [eax + edi*8]
push 0
push esi
push ecx
push edx
call fcn.00438270
push 0
lea ecx, [ebp - 0x68]
push ecx
mov dword [ebp - 0x68], edx
mov edx, dword [ebp - 0x38]
push eax
push edx
mov dword [ebp - 0x6c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x38]
push 0
lea eax, [ebp - 0x40]
push eax
push esi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x2c], eax
cmp eax, esi
jb 0x405a43
mov dword [ebp - 0x2c], esi
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
push 0
lea edx, [ebp - 0x40]
push edx
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x405a73
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x520914
lea edx, [ebp - 0x5c]
push edx
mov dword [ebp - 0x5c], eax
call fcn.0043615f
mov ecx, dword [ebp - 0x74]
add ecx, dword [ebp - 0x40]
xor edx, edx
mov dword [ebp - 0x74], ecx
je 0x405a93
xor eax, eax
push eax
push eax
push ecx
mov ecx, dword [ebp - 0x50]
push eax
mov eax, dword [ebp - 0x84]
push eax
push ecx
call edx
mov eax, dword [ebp - 0x2c]
inc edi
sub dword [ebp - 0x30], eax
jmp 0x4059f0
test ebx, ebx
je 0x405af8
push ebx
call fcn.00431fb7
add esp, 4
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x405b06
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x405b14
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x405b24
push eax
call fcn.00431fb7
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.00431c7a
mov esp, ebp
pop ebp
ret