Function at 0x411080
Capabilities:
Check if file exists
Get disk size
Get file size
Write file on windows

Disassembly:
sub esp, 0x26c
mov eax, dword [0x45ce14]
xor eax, esp
mov dword [esp + 0x268], eax
mov eax, dword [esp + 0x278]
push ebx
mov ebx, dword [esp + 0x274]
mov dword [esp + 0x30], ebx
push ebp
mov ebp, dword [esp + 0x27c]
mov dword [esp + 0x14], ebp
push esi
push edi
test al, 2
je 0x41122b
push 0
push 0x108
push 2
lea eax, [esp + 0x74]
mov dword [esp + 0x20], 0xffffffff
push eax
lea ecx, [esp + 0x64]
mov dword [esp + 0x20], vtable.RawDiskFileClass.0
call fcn.00403130
mov eax, dword [esp + 0x64]
xor ecx, ecx
push ebx
mov word [eax], cx
lea ecx, [esp + 0x58]
call fcn.00407c70
push 0
push 0
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x74]
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
je 0x4112b8
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x10]
mov edi, dword [esp + 0x34]
imul edi, dword [esp + 0x38]
push 0
mov eax, dword [eax + 0x30]
push 3
push 3
push 0xc0000000
push ebx
call eax
test al, al
je 0x4112b8
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [esp + 0x24], esi
cmp esi, 0xffffffff
jne 0x41117a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x411176
xorps xmm0, xmm0
movlpd qword [esp + 0x24], xmm0
mov esi, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
lea ecx, [esp + 0x40]
push 1
call fcn.00403100
push 1
push edi
lea ecx, [esp + 0x48]
call fcn.004031e0
test al, al
je 0x4112ab
mov eax, esi
or eax, ebp
je 0x4111da
mov ebx, edi
test ebp, ebp
jl 0x4111b3
jg 0x4111af
cmp esi, ebx
jbe 0x4111b3
mov edi, ebx
jmp 0x4111b5
mov edi, esi
push 0
lea eax, [esp + 0x24]
push eax
push edi
push dword [esp + 0x5c]
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esi, edi
mov eax, esi
sbb ebp, 0
or eax, ebp
jne 0x4111a5
mov ebx, dword [esp + 0x3c]
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
lea ecx, [esp + 0x40]
call fcn.004031c0
lea ecx, [esp + 0x54]
call fcn.004031c0
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], vtable.HandleClass.0
call fcn.00412610
test al, al
je 0x411220
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x10]
call dword [eax + 0x1c]
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x288]
test al, 4
je 0x411348
test ebx, ebx
je 0x411344
cmp word [ebx], 0
je 0x411344
lea ecx, [esp + 0x24]
call fcn.0040b450
lea eax, [esp + 0x24]
mov ecx, 0x45e8c8
push eax
mov eax, dword [esp + 0x28c]
and al, 1
movzx eax, al
push eax
push ebx
call fcn.00405b50
sub eax, 1
je 0x411299
sub eax, 1
je 0x41131f
push ebp
push ebx
call fcn.00413be0
add esp, 8
test al, al
je 0x411306
mov eax, dword [0x45e9d8]
test eax, eax
je 0x411299
push 0
push ebx
push 5
push 4
call eax
lea ecx, [esp + 0x24]
mov bl, 1
call fcn.0040b4a0
mov al, bl
jmp 0x411352
lea ecx, [esp + 0x40]
call fcn.004031c0
mov ebp, dword [esp + 0x1c]
push ebx
mov ecx, ebp
call fcn.00404b00
lea ecx, [esp + 0x54]
mov byte [esp + 0x1b], al
call fcn.004031c0
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], vtable.HandleClass.0
call fcn.00412610
test al, al
je 0x4112f7
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x10]
call dword [eax + 0x1c]
cmp byte [esp + 0x1b], 0
jne 0x411224
xor al, al
jmp 0x411352
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
lea ecx, [esp + 0x24]
sete bl
call fcn.0040b4a0
mov al, bl
jmp 0x411352
mov esi, dword [ebp]
lea ecx, [esp + 0x2c]
push 0
call fcn.0040bbb0
push eax
mov eax, dword [esi + 4]
mov ecx, ebp
call eax
lea ecx, [esp + 0x24]
mov bl, al
call fcn.0040b4a0
mov al, bl
jmp 0x411352
mov al, 1
jmp 0x411352
push ebp
push ebx
call fcn.00413be0
add esp, 8
mov ecx, dword [esp + 0x278]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041e282
add esp, 0x26c
ret