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

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
sub esp, 0x324
push ebx
mov dword [ebp - 8], eax
push esi
mov dword [ebp - 0xc], eax
push edi
mov dword [ebp - 4], eax
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
cmp edi, eax
je 0x1005c6b
lea eax, [ebp - 0x324]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x1005a66
xor eax, eax
push eax
push 0x10
push eax
push eax
push 0x4bc
push eax
call fcn.010044fb
call fcn.010062f2
mov dword [0x1017b24], eax
xor eax, eax
jmp 0x1005c70
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 4]
push eax
lea edx, [ebp - 0xc]
push ecx
lea eax, [ebp - 8]
push edx
xor ebx, ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
jne 0x1005af0
lea edi, [ebp - 0x21f]
xor eax, eax
mov ecx, 0x7f
mov byte [ebp - 0x220], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.010062f2
push ebx
mov dword [0x1017b24], eax
push 0x200
lea eax, [ebp - 0x220]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push ebx
lea eax, [ebp - 0x220]
push 0x10
push eax
push esi
push 0x4b0
push ebx
call fcn.010044fb
lea ecx, [ebp - 0x324]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
xor eax, eax
jmp 0x1005c70
xor ebx, ebx
lea eax, [ebp - 0x18]
push ebx
lea ecx, [ebp - 0x20]
push ebx
push eax
push ecx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
jne 0x1005b77
lea edi, [ebp - 0x21f]
xor eax, eax
mov ecx, 0x7f
mov byte [ebp - 0x220], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.010062f2
push ebx
mov dword [0x1017b24], eax
push 0x200
lea eax, [ebp - 0x220]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push ebx
lea eax, [ebp - 0x220]
push 0x10
push eax
push esi
push 0x4f9
push ebx
call fcn.010044fb
lea ecx, [ebp - 0x324]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
xor eax, eax
jmp 0x1005c70
lea eax, [ebp - 0x324]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 3
lea eax, [ebp - 0x14]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
xor ax, ax
mov esi, dword [ebp - 0xc]
imul esi, dword [ebp - 8]
mov ecx, esi
mov edx, 0x200
imul ecx, dword [ebp - 4]
cmp esi, edx
je 0x1005bb4
inc ax
add edx, edx
cmp ax, 8
jb 0x1005ba6
cmp ax, 8
jne 0x1005bd3
xor eax, eax
push eax
push 0x10
push eax
push eax
push 0x4c5
push eax
call fcn.010044fb
xor eax, eax
jmp 0x1005c70
test byte [0x1011c24], 8
je 0x1005bff
test byte [ebp - 0x17], 0x80
je 0x1005bff
movzx eax, ax
mov edx, dword [0x1011c28]
mov esi, dword [eax*4 + 0x1017b00]
shr edx, 2
add esi, esi
add edx, dword [0x1011c28]
jmp 0x1005c0f
movzx eax, ax
mov edx, dword [0x1011c28]
mov esi, dword [eax*4 + 0x1017b00]
mov eax, edi
and eax, 1
je 0x1005c35
test edi, 2
je 0x1005c35
lea eax, [edx + esi]
cmp eax, ecx
jbe 0x1005c61
lea eax, [ebp - 0x14]
push eax
push edx
push esi
push dword [ebp + 0x10]
call fcn.01002b2a
jmp 0x1005c70
test eax, eax
je 0x1005c4d
cmp esi, ecx
jbe 0x1005c61
lea eax, [ebp - 0x14]
push eax
push edx
push esi
push dword [ebp + 0x10]
call fcn.01002b2a
jmp 0x1005c70
cmp edx, ecx
jbe 0x1005c61
lea eax, [ebp - 0x14]
push eax
push edx
push esi
push dword [ebp + 0x10]
call fcn.01002b2a
jmp 0x1005c70
mov dword [0x1017b24], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc