Function at 0x40567e
Capabilities:
Get common file path
Get disk information
Get disk size
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x32c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
lea eax, [ebp - 0x310]
mov dword [ebp - 0x318], edx
push eax
push 0x104
push ecx
pop esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
sub ebx, ebx
test eax, eax
jne 0x4056de
push ebx
push 0x10
push ebx
push ebx
mov edx, 0x4bc
xor ecx, ecx
call fcn.004041b0
call fcn.00405f71
mov dword [0x409a88], eax
xor eax, eax
jmp 0x40591c
push edi
lea eax, [ebp - 0x324]
mov dword [ebp - 0x31c], ebx
push eax
lea eax, [ebp - 0x320]
mov dword [ebp - 0x314], ebx
push eax
lea eax, [ebp - 0x314]
mov dword [ebp - 0x320], ebx
push eax
lea eax, [ebp - 0x31c]
mov dword [ebp - 0x324], ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x4058af
mov edi, dword [ebp - 0x314]
imul edi, dword [ebp - 0x31c]
push 0x400
push dword [ebp - 0x320]
push edi
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov dword [ebp - 0x314], eax
test eax, eax
je 0x4058af
push ebx
push ebx
lea eax, [ebp - 0x328]
push eax
lea eax, [ebp - 0x32c]
push eax
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
jne 0x4057bd
push 0x1ff
lea eax, [ebp - 0x20b]
mov byte [ebp - 0x20c], bl
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
call fcn.00405f71
push ebx
mov dword [0x409a88], eax
lea eax, [ebp - 0x20c]
push 0x200
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, 0x4f9
jmp 0x4058fa
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [ebp - 0xc]
push 6
push ecx
pop eax
pop edx
sub esi, eax
lea eax, [edx - 4]
test eax, eax
je 0x4057e8
mov al, byte [esi + ecx]
test al, al
je 0x4057e8
mov byte [ecx], al
inc ecx
dec edx
jne 0x4057d4
or edx, edx
jne 0x4057ed
dec ecx
push 8
mov byte [ecx], bl
mov eax, ebx
mov ecx, 0x200
pop edx
cmp edi, ecx
je 0x405805
add ecx, ecx
inc eax
cmp ax, dx
jb 0x4057f9
cmp ax, dx
jne 0x405820
push ebx
push 0x10
push ebx
push ebx
mov edx, 0x4c5
sub ecx, ecx
call fcn.004041b0
jmp 0x405919
test byte [0x409a74], 8
je 0x405852
test dword [ebp - 0x328], 0x8000
je 0x405852
mov ecx, dword [0x409a78]
movzx eax, ax
shr ecx, 2
mov edx, dword [eax*4 + 0x408900]
add edx, edx
add ecx, dword [0x409a78]
jmp 0x405862
mov ecx, dword [0x409a78]
movzx eax, ax
mov edx, dword [eax*4 + 0x408900]
mov eax, dword [ebp - 0x318]
and eax, 1
je 0x405881
test byte [ebp - 0x318], 2
je 0x405881
lea eax, [ecx + edx]
cmp eax, dword [ebp - 0x314]
jmp 0x405893
test eax, eax
je 0x40588d
cmp edx, dword [ebp - 0x314]
jmp 0x405893
cmp ecx, dword [ebp - 0x314]
jbe 0x4058a4
lea eax, [ebp - 0xc]
push eax
push ecx
mov ecx, dword [ebp + 8]
call fcn.00402457
jmp 0x40591b
xor eax, eax
mov dword [0x409a88], ebx
inc eax
jmp 0x40591b
push 0x1ff
lea eax, [ebp - 0x20b]
mov byte [ebp - 0x20c], bl
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
call fcn.00405f71
push ebx
mov dword [0x409a88], eax
lea eax, [ebp - 0x20c]
push 0x200
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, 0x4b0
push ebx
push 0x10
lea eax, [ebp - 0x20c]
sub ecx, ecx
push eax
push esi
call fcn.004041b0
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.004069ed
mov esp, ebp
pop ebp
ret 4