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

Disassembly:
mov eax, dword [0x4c4790]
sub esp, 0x18
test eax, eax
push ebx
push ebp
push esi
push edi
je 0x46c4d1
mov ecx, dword [esp + 0x34]
mov eax, 0x8080
test cl, 1
je 0x46c483
mov eax, 0x8180
test cl, 4
je 0x46c48b
or ah, 4
test cl, 0x10
jne 0x46c492
or al, 2
test cl, 0x40
je 0x46c49b
or al, 0x20
jmp 0x46c49d
or al, 0x10
test cl, 0x80
je 0x46c4a4
or al, 0x40
test ch, 1
je 0x46c4ac
or ah, 2
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x30]
push edx
push eax
mov eax, dword [esp + 0x3c]
push eax
push ecx
call fcn.00472cf0
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov edx, dword [esp + 0x34]
mov ebp, dword [esp + 0x3c]
mov ebx, edx
mov dword [esp + 0x38], 0
and ebx, 8
mov dword [esp + 0x1c], ebx
je 0x46c4f3
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x20], eax
mov ecx, dword [ebp + 0xc]
xor eax, eax
mov dword [esp + 0x14], ecx
mov ecx, 9
mov edi, ebp
mov dword [esp + 0x10], 0x80000000
rep stosd dword es:[edi], eax
test dl, 0x10
mov dword [ebp + 4], 0xffffffff
jne 0x46c521
mov dword [esp + 0x10], 0xc0000000
mov eax, edx
mov esi, 0x80
and eax, 1
je 0x46c53c
test dl, 4
je 0x46c53c
mov dword [esp + 0x3c], 1
jmp 0x46c56c
test eax, eax
jne 0x46c54f
test dh, 1
je 0x46c55e
mov dword [esp + 0x3c], 5
jmp 0x46c56c
test dh, 1
je 0x46c55e
mov dword [esp + 0x3c], 2
jmp 0x46c56c
xor ecx, ecx
test eax, eax
setne cl
add ecx, 3
mov dword [esp + 0x3c], ecx
test ebx, ebx
je 0x46c584
mov al, byte [ebp + 0x20]
mov dword [esp + 0x34], 0x80000080
mov esi, dword [esp + 0x34]
or al, 1
mov byte [ebp + 0x20], al
test dl, 0x40
je 0x46c591
or esi, 0x8000000
jmp 0x46c597
or esi, 0x10000000
test dl, 0x80
mov dword [esp + 0x34], esi
je 0x46c5aa
or esi, 0x4000000
mov dword [esp + 0x34], esi
mov ebx, dword [esp + 0x30]
test dl, 2
je 0x46c615
mov eax, dword [esp + 0x14]
test eax, eax
je 0x46c615
mov al, byte [ebx]
test al, al
je 0x46c615
cmp byte [ebx + 1], 0x3a
jne 0x46c5e5
movsx edx, al
push edx
push str._c:_
lea eax, [esp + 0x38]
push 4
push eax
lea edi, [esp + 0x40]
call fcn.004a7c2b
add esp, 0x10
jmp 0x46c5e7
xor edi, edi
push 0
lea ecx, [esp + 0x1c]
push 0
push ecx
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x46c615
mov eax, dword [esp + 0x14]
xor edx, edx
div dword [esp + 0x18]
test edx, edx
jne 0x46c615
or esi, 0x20000000
mov dword [esp + 0x34], esi
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push esi
push edx
push 0
push 3
push eax
push ebx
call edi
cmp eax, 0xffffffff
mov dword [ebp], eax
jne 0x46c694
mov esi, 2
call fcn.00447830
cmp eax, 0x17
mov dword [esp + 0x38], eax
je 0x46c658
cmp eax, 0x18
je 0x46c658
cmp eax, 0x1c
jne 0x46c720
cmp esi, 6
ja 0x46c720
mov ecx, dword [esp + 0x2c]
push 0
push esi
push ecx
call fcn.00450570
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x1c]
add esp, 0xc
add esi, 2
push 0
push edx
push eax
push 0
push 3
push ecx
push ebx
call edi
cmp eax, 0xffffffff
mov dword [ebp], eax
je 0x46c63c
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46c74c
mov esi, dword [esp + 0x20]
test esi, esi
je 0x46c74c
call fcn.004958e0
test eax, eax
je 0x46c74c
mov edx, dword [ebp]
push 0
dec esi
push 0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edx
call esi
cmp eax, 0xffffffff
je 0x46c720
mov ecx, dword [ebp]
lea eax, [esp + 0x24]
push 0
push eax
push 1
push 0x726dc8
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46c720
cmp dword [esp + 0x24], 1
jne 0x46c720
mov edx, dword [ebp]
push edx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x46c720
mov eax, dword [ebp]
push 0
push 0
push 0
push eax
call esi
cmp eax, 0xffffffff
je 0x46c720
mov ecx, dword [ebp]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x46c74c
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x46c731
call fcn.00447830
mov dword [esp + 0x38], eax
mov ebp, dword [ebp]
cmp ebp, 0xffffffff
je 0x46c740
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x38]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov al, byte [ebp + 0x20]
pop edi
or al, 4
pop esi
mov byte [ebp + 0x20], al
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret