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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
push dword [ebp + 8]
xor edi, edi
mov dword [0x10f21e0], edi
mov dword [esi], edi
call fcn.0108a8ea
sub eax, edi
je 0x108ace4
dec eax
jne 0x108ad0f
cmp dword [0x10f4630], edi
jne 0x108ab3f
push dword [0x10f45ec]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push dword [ebp + 0x18]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
push dword [ebp + 0x10]
mov dword [esi], edi
push dword [ebp + 0xc]
push dword [0x10f45ec]
call ebx
cmp dword [0x10f4640], edi
mov dword [ebp + 0xc], eax
je 0x108ab7f
mov eax, dword [ebp + 0x10]
cmp eax, dword [esi]
je 0x108ab77
mov dword [0x10f21e0], 0x469
jmp 0x108ab9d
xor eax, eax
inc eax
jmp 0x108ad22
cmp eax, edi
jne 0x108aba4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x70
mov dword [0x10f21e0], eax
jne 0x108ab9d
mov dword [0x10f4640], 1
xor eax, eax
jmp 0x108ad22
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x10f19b8
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x108abe1
cmp dword [ebp - 0xc], edi
jne 0x108ad0f
cmp dword [ebp - 4], edi
mov eax, 0x40000000
jne 0x108abd5
mov eax, dword [ebp - 8]
shr eax, 2
cmp dword [ebp - 0x10], eax
sbb eax, eax
neg eax
jmp 0x108abe4
xor eax, eax
inc eax
cmp ax, di
je 0x108ad0f
push dword [ebp + 0x18]
lea eax, [ebp + 0x10]
push eax
mov dword [ebp + 0x10], edi
mov edi, 0xc00
push edi
push 0x10f0db8
push dword [0x10f45ec]
call ebx
test eax, eax
jne 0x108ac68
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
and dword [ebp + 0xc], eax
call ebx
cmp eax, 0x70
mov dword [0x10f21e0], eax
jne 0x108ad0f
xor eax, eax
inc eax
cmp dword [esi], edi
mov dword [0x10f4640], eax
jbe 0x108ad0f
push eax
push 0
mov edi, 0xfffff400
push edi
push dword [0x10f45ec]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x108ac55
call ebx
jmp 0x108acc4
push dword [0x10f45ec]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
add dword [esi], edi
jmp 0x108ad0f
cmp dword [ebp + 0x10], edi
jne 0x108ac9a
xor edi, edi
inc edi
push edi
push 0
push 0xfffff400
push dword [0x10f45ec]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x108acbe
push dword [0x10f45ec]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [ebp + 0xc], edi
jmp 0x108ad0f
mov eax, dword [esi]
cmp eax, edi
jae 0x108aca2
mov edi, eax
xor ebx, ebx
inc ebx
push ebx
push 0
mov eax, edi
neg eax
push eax
push dword [0x10f45ec]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x108acca
call dword [sym.imp.KERNEL32.dll_GetLastError]
and dword [ebp + 0xc], 0
jmp 0x108ad0a
push dword [0x10f45ec]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
sub dword [esi], edi
and dword [ebp + 0xc], 0
mov dword [0x10f4640], ebx
jmp 0x108ad0f
push dword [ebp + 0x18]
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0108a911
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, edi
mov dword [ebp + 0xc], eax
jne 0x108ad0f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x10f21e0], eax
mov eax, dword [esi]
xor edx, edx
div dword [0x10e61f8]
add dword [0x10f4630], eax
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0x14