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

Disassembly:
sub esp, 0x4c
push ebx
push ebp
mov ebp, dword [esp + 0x58]
cmp dword [ebp + 0x30], 0xffffffff
push esi
push edi
mov ebx, eax
mov edi, ecx
je 0x407485
cmp dword [ebp + 0x34], 0x40000000
jne 0x407485
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x407485
mov eax, dword [ebp + 0xc]
sub eax, ecx
sar eax, 2
cmp edi, eax
jae 0x407485
mov esi, ebp
call fcn.00406aa0
mov ecx, dword [ebp]
mov ecx, dword [ecx + 0xc]
test ecx, ecx
mov dword [esp + 0x18], eax
jne 0x4072b9
cmp eax, ebx
lea esi, [ebp + 4]
jb 0x4071c9
call fcn.0040e210
mov edx, dword [eax]
mov eax, dword [edx + 0x1c]
lea esi, [ebp + 4]
mov dword [esp + 0x10], eax
call fcn.0040e210
mov ecx, dword [eax]
lea esi, [ebp + 4]
mov dword [ecx + 0x20], ebx
call fcn.0040e210
mov edx, dword [eax]
mov eax, dword [esp + 0x10]
push 0
push 0
mov dword [edx + 0x24], ebx
mov ecx, dword [ebp + 0x30]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, ebx
shr esi, 0x11
xor edi, edi
test esi, esi
jle 0x40718d
mov edx, dword [esp + 0x64]
mov dword [esp + 0x10], edx
mov ecx, dword [esp + 0x10]
mov edx, dword [ebp + 0x30]
push 0
lea eax, [esp + 0x64]
push eax
push 0x20000
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x407485
mov eax, 0x20000
cmp dword [esp + 0x60], eax
jne 0x407485
cmp byte [0x48ac68], 0
jne 0x407485
add dword [esp + 0x10], eax
add edi, 1
cmp edi, esi
jl 0x407143
mov ecx, dword [esp + 0x64]
mov edx, dword [ebp + 0x30]
push 0
shl esi, 0x11
lea eax, [esp + 0x64]
push eax
sub ebx, esi
push ebx
add esi, ecx
push esi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x407485
cmp dword [esp + 0x60], ebx
je 0x4075d7
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 8
call fcn.0040e210
mov esi, dword [eax]
mov eax, dword [ebp]
mov ecx, dword [eax + 0x10]
push 0
push 0
lea edx, [esp + 0x20]
push edx
push 0
mov dword [esi + 0x1c], ecx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
cmp dword [esp + 0x1c], 0
jne 0x407201
cmp dword [esp + 0x18], ebx
jb 0x407485
mov eax, dword [esi + 0x1c]
mov ecx, dword [ebp + 0x30]
push 0
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, ebx
shr esi, 0x11
xor edi, edi
test esi, esi
jle 0x407270
mov edx, dword [esp + 0x64]
mov dword [esp + 0x10], edx
mov ecx, dword [esp + 0x10]
mov edx, dword [ebp + 0x30]
push 0
lea eax, [esp + 0x64]
push eax
push 0x20000
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x407485
mov eax, 0x20000
cmp dword [esp + 0x60], eax
jne 0x407485
cmp byte [0x48ac68], 0
jne 0x407485
add dword [esp + 0x10], eax
add edi, 1
cmp edi, esi
jl 0x407226
mov edx, dword [esp + 0x64]
mov eax, esi
push 0
shl eax, 0x11
lea ecx, [esp + 0x64]
push ecx
mov esi, ebx
sub esi, eax
push esi
add eax, edx
push eax
mov eax, dword [ebp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x407485
cmp dword [esp + 0x60], esi
jne 0x407485
mov ebp, dword [ebp]
add dword [ebp + 0x10], ebx
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 8
cmp ecx, 1
jne 0x407485
push ebx
call fcn.00417ad0
add esp, 4
push 4
push 0x1000
push eax
push 0
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [esp + 0x60], eax
je 0x407485
mov edx, dword [esp + 0x64]
xor ecx, ecx
push 0x38
push str.1.2.3
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
push 0xffffffffffffffff
mov esi, ebx
push ecx
shr esi, 0x11
mov dword [esp + 0x30], edx
mov dword [esp + 0x40], eax
call fcn.004195e0
add esp, 0x10
test esi, esi
mov dword [esp + 0x64], 0
jl 0x407385
cmp dword [esp + 0x64], esi
jne 0x40734d
mov edx, esi
shl edx, 0x11
mov eax, ebx
sub eax, edx
mov dword [esp + 0x24], eax
jmp 0x407355
mov dword [esp + 0x24], 0x20000
lea ecx, [esp + 0x20]
push 0
push ecx
call fcn.00417b90
add esp, 8
cmp byte [0x48ac68], 0
jne 0x407491
cmp eax, 1
je 0x407385
mov eax, dword [esp + 0x64]
add eax, 1
cmp eax, esi
mov dword [esp + 0x64], eax
jle 0x407338
lea eax, [esp + 0x20]
push 4
push eax
call fcn.00417b90
mov esi, dword [esp + 0x3c]
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x70], esi
call fcn.00418400
add esp, 0xc
cmp dword [esp + 0x18], esi
lea esi, [ebp + 4]
jb 0x4074eb
call fcn.0040e210
mov edx, dword [eax]
mov eax, dword [edx + 0x1c]
lea esi, [ebp + 4]
mov dword [esp + 0x18], eax
call fcn.0040e210
mov ecx, dword [eax]
lea esi, [ebp + 4]
mov dword [ecx + 0x20], ebx
call fcn.0040e210
mov edx, dword [eax]
mov edi, dword [esp + 0x64]
mov eax, dword [esp + 0x18]
push 0
push 0
mov dword [edx + 0x24], edi
mov ecx, dword [ebp + 0x30]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, edi
shr esi, 0x11
xor ebx, ebx
test esi, esi
jle 0x40744b
mov edx, dword [esp + 0x60]
mov dword [esp + 0x64], edx
mov ecx, dword [esp + 0x64]
mov edx, dword [ebp + 0x30]
push 0
lea eax, [esp + 0x14]
push eax
push 0x20000
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4074cd
mov eax, 0x20000
cmp dword [esp + 0x10], eax
jne 0x4074cd
cmp byte [0x48ac68], 0
jne 0x4074af
add dword [esp + 0x64], eax
add ebx, 1
cmp ebx, esi
jl 0x407405
mov ebx, dword [esp + 0x60]
mov eax, dword [ebp + 0x30]
push 0
shl esi, 0x11
lea edx, [esp + 0x14]
push edx
sub edi, esi
push edi
add esi, ebx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x407477
cmp dword [esp + 0x10], edi
je 0x4075c9
push 0x8000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 8
mov edx, dword [esp + 0x60]
push 0x8000
push 0
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 8
mov eax, dword [esp + 0x60]
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 8
mov ecx, dword [esp + 0x60]
push 0x8000
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 8
call fcn.0040e210
mov esi, dword [eax]
mov ecx, dword [ebp]
mov edx, dword [ecx + 0x10]
mov edi, dword [esp + 0x64]
push 0
push 0
lea eax, [esp + 0x20]
push eax
push 0
mov dword [esi + 0x1c], edx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], edi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
cmp dword [esp + 0x1c], 0
jne 0x407523
cmp dword [esp + 0x18], edi
jb 0x4074cd
mov edx, dword [esi + 0x1c]
mov eax, dword [ebp + 0x30]
push 0
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, edi
shr esi, 0x11
xor ebx, ebx
test esi, esi
jle 0x40758f
mov edi, dword [esp + 0x60]
mov edx, dword [ebp + 0x30]
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x20000
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4074cd
cmp dword [esp + 0x10], 0x20000
jne 0x4074cd
cmp byte [0x48ac68], 0
jne 0x4074af
add ebx, 1
add edi, 0x20000
cmp ebx, esi
jl 0x407544
mov edi, dword [esp + 0x64]
mov ebx, dword [esp + 0x60]
mov eax, dword [ebp + 0x30]
push 0
shl esi, 0x11
lea edx, [esp + 0x14]
push edx
sub edi, esi
push edi
add esi, ebx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x407477
cmp dword [esp + 0x10], edi
jne 0x407477
mov ebp, dword [ebp]
mov ecx, dword [esp + 0x64]
add dword [ebp + 0x10], ecx
push 0x8000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x4c
ret 8