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

Disassembly:
sub esp, 0x26c
mov eax, dword [0x45cdfc]
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 0x41114b
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.00403170
mov eax, dword [esp + 0x64]
xor ecx, ecx
push ebx
mov word [eax], cx
lea ecx, [esp + 0x58]
call fcn.00407c50
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 0x4111d8
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 0x4111d8
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 0x41109a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x411096
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.00403140
push 1
push edi
lea ecx, [esp + 0x48]
call fcn.00403220
test al, al
je 0x4111cb
mov eax, esi
or eax, ebp
je 0x4110fa
mov ebx, edi
test ebp, ebp
jl 0x4110d3
jg 0x4110cf
cmp esi, ebx
jbe 0x4110d3
mov edi, ebx
jmp 0x4110d5
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 0x4110c5
mov ebx, dword [esp + 0x3c]
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
lea ecx, [esp + 0x40]
call fcn.00403200
lea ecx, [esp + 0x54]
call fcn.00403200
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], vtable.HandleClass.0
call fcn.00412520
test al, al
je 0x411140
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 0x411268
test ebx, ebx
je 0x411264
cmp word [ebx], 0
je 0x411264
lea ecx, [esp + 0x24]
call fcn.0040b350
lea eax, [esp + 0x24]
mov ecx, 0x45e8b8
push eax
mov eax, dword [esp + 0x28c]
and al, 1
movzx eax, al
push eax
push ebx
call fcn.00405b30
sub eax, 1
je 0x4111b9
sub eax, 1
je 0x41123f
push ebp
push ebx
call fcn.00413b10
add esp, 8
test al, al
je 0x411226
mov eax, dword [0x45e9c8]
test eax, eax
je 0x4111b9
push 0
push ebx
push 5
push 4
call eax
lea ecx, [esp + 0x24]
mov bl, 1
call fcn.0040b3a0
mov al, bl
jmp 0x411272
lea ecx, [esp + 0x40]
call fcn.00403200
mov ebp, dword [esp + 0x1c]
push ebx
mov ecx, ebp
call fcn.00404b00
lea ecx, [esp + 0x54]
mov byte [esp + 0x1b], al
call fcn.00403200
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], vtable.HandleClass.0
call fcn.00412520
test al, al
je 0x411217
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 0x411144
xor al, al
jmp 0x411272
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
lea ecx, [esp + 0x24]
sete bl
call fcn.0040b3a0
mov al, bl
jmp 0x411272
mov esi, dword [ebp]
lea ecx, [esp + 0x2c]
push 0
call fcn.0040baf0
push eax
mov eax, dword [esi + 4]
mov ecx, ebp
call eax
lea ecx, [esp + 0x24]
mov bl, al
call fcn.0040b3a0
mov al, bl
jmp 0x411272
mov al, 1
jmp 0x411272
push ebp
push ebx
call fcn.00413b10
add esp, 8
mov ecx, dword [esp + 0x278]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041e5aa
add esp, 0x26c
ret