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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x1c], ebx
je 0x10051b6
lea eax, [ebp - 0x124]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
call esi
test eax, eax
jne 0x100500a
push ebx
push 0x10
push ebx
push ebx
push 0x4bc
push ebx
call fcn.01003cba
call fcn.01005723
mov dword [0x100b704], eax
jmp 0x1005141
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
jne 0x1005078
push 0x7f
lea edi, [ebp - 0x323]
pop ecx
mov byte [ebp - 0x324], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.01005723
mov dword [0x100b704], eax
push ebx
lea eax, [ebp - 0x324]
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]
push ebx
lea eax, [ebp - 0x324]
push 0x10
push eax
push dword [ebp + 8]
push 0x4b0
jmp 0x10050e1
push ebx
lea eax, [ebp - 0x18]
push ebx
push eax
lea eax, [ebp - 0x20]
push eax
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
jne 0x10050f2
push 0x7f
lea edi, [ebp - 0x323]
pop ecx
mov byte [ebp - 0x324], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.01005723
mov dword [0x100b704], eax
push ebx
lea eax, [ebp - 0x324]
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]
push ebx
lea eax, [ebp - 0x324]
push 0x10
push eax
push dword [ebp + 8]
push 0x4f9
push ebx
call fcn.01003cba
lea eax, [ebp - 0x124]
push eax
call esi
jmp 0x1005141
lea eax, [ebp - 0x124]
push eax
call esi
push 3
lea eax, [ebp - 0x14]
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [ebp - 0xc]
mov edx, 0x200
imul eax, dword [ebp - 4]
mov esi, eax
imul esi, dword [ebp - 8]
xor ecx, ecx
cmp eax, edx
je 0x100512b
shl edx, 1
inc ecx
cmp cx, 8
jb 0x100511e
cmp cx, 8
jne 0x1005145
push ebx
push 0x10
push ebx
push ebx
push 0x4c5
push ebx
call fcn.01003cba
xor eax, eax
jmp 0x10051b9
test byte [0x100b6d4], 8
je 0x100516f
test byte [ebp - 0x17], 0x80
je 0x100516f
mov edx, dword [0x100b6d8]
movzx eax, cx
mov ecx, edx
mov eax, dword [eax*4 + 0x100b6e0]
shr ecx, 2
shl eax, 1
add ecx, edx
jmp 0x100517f
movzx eax, cx
mov ecx, dword [0x100b6d8]
mov eax, dword [eax*4 + 0x100b6e0]
mov edi, dword [ebp + 0xc]
and edi, 1
je 0x1005194
test byte [ebp + 0xc], 2
je 0x1005194
lea edx, [ecx + eax]
cmp edx, esi
jmp 0x100519e
cmp edi, ebx
je 0x100519c
cmp eax, esi
jmp 0x100519e
cmp ecx, esi
jbe 0x10051b0
lea edx, [ebp - 0x14]
push edx
push ecx
push eax
push dword [ebp + 0x10]
call fcn.010022cb
jmp 0x10051b9
mov dword [0x100b704], ebx
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 0xc