Function at 0x10051cf
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 0x100543c
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 0x1005237
xor eax, eax
push eax
push 0x10
push eax
push eax
push 0x4bc
push eax
call fcn.01003e4b
call fcn.01005aa0
mov dword [0x1015fcc], eax
xor eax, eax
jmp 0x1005441
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 0x10052c1
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.01005aa0
push ebx
mov dword [0x1015fcc], 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.01003e4b
lea ecx, [ebp - 0x324]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
xor eax, eax
jmp 0x1005441
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 0x1005348
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.01005aa0
push ebx
mov dword [0x1015fcc], 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.01003e4b
lea ecx, [ebp - 0x324]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
xor eax, eax
jmp 0x1005441
lea eax, [ebp - 0x324]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 3
lea eax, [ebp - 0x14]
push esi
push eax
mov esi, 0x200
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
xor dx, dx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
imul eax, dword [ebp - 8]
imul ecx, eax
cmp esi, eax
je 0x1005385
inc dx
add esi, esi
cmp dx, 8
jb 0x1005377
cmp dx, 8
jne 0x10053a4
xor eax, eax
push eax
push 0x10
push eax
push eax
push 0x4c5
push eax
call fcn.01003e4b
xor eax, eax
jmp 0x1005441
test byte [0x1015fc4], 8
je 0x10053d0
test byte [ebp - 0x17], 0x80
je 0x10053d0
movzx eax, dx
mov esi, dword [0x1015fc8]
mov edx, dword [eax*4 + 0x1016310]
shr esi, 2
add edx, edx
add esi, dword [0x1015fc8]
jmp 0x10053e0
movzx eax, dx
mov esi, dword [0x1015fc8]
mov edx, dword [eax*4 + 0x1016310]
mov eax, edi
and eax, 1
je 0x1005406
test edi, 2
je 0x1005406
lea eax, [edx + esi]
cmp eax, ecx
jbe 0x1005432
lea eax, [ebp - 0x14]
push eax
push esi
push edx
push dword [ebp + 0x10]
call fcn.01002a18
jmp 0x1005441
test eax, eax
je 0x100541e
cmp edx, ecx
jbe 0x1005432
lea eax, [ebp - 0x14]
push eax
push esi
push edx
push dword [ebp + 0x10]
call fcn.01002a18
jmp 0x1005441
cmp esi, ecx
jbe 0x1005432
lea eax, [ebp - 0x14]
push eax
push esi
push edx
push dword [ebp + 0x10]
call fcn.01002a18
jmp 0x1005441
mov dword [0x1015fcc], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc