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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x52c
push edi
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x1c], 0
cmp dword [ebp + 0xc], 0
jne 0x1006a52
mov eax, 1
jmp 0x1006d53
lea eax, [ebp - 0x124]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x1006a97
push 0
push 0x10
push 0
push 0
push 0x4bc
push 0
call fcn.01004e90
call fcn.01007810
mov dword [0x100e704], eax
xor eax, eax
jmp 0x1006d53
lea edx, [ebp - 0x20]
push edx
push 0
call fcn.01007f10
mov dword [ebp - 0x12c], eax
cmp dword [ebp - 0x12c], 0
jne 0x1006b27
mov byte [ebp - 0x32c], 0
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x32b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.01007810
mov dword [0x100e704], eax
push 0
push 0x200
lea eax, [ebp - 0x32c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push 0
push 0x10
lea ecx, [ebp - 0x32c]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0x4b0
push 0
call fcn.01004e90
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
xor eax, eax
jmp 0x1006d53
push 0
push 0
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 8]
push edx
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
jne 0x1006bbb
mov byte [ebp - 0x52c], 0
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x52b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.01007810
mov dword [0x100e704], eax
push 0
push 0x200
lea eax, [ebp - 0x52c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push 0
push 0x10
lea ecx, [ebp - 0x52c]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0x4f9
push 0
call fcn.01004e90
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
xor eax, eax
jmp 0x1006d53
lea ecx, [ebp - 0x124]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 3
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], 0x200
mov word [ebp - 0xc], 0
jmp 0x1006bfa
mov cx, word [ebp - 0xc]
add cx, 1
mov word [ebp - 0xc], cx
mov edx, dword [ebp - 0xc]
and edx, 0xffff
cmp edx, 8
jge 0x1006c1c
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x1c]
jne 0x1006c12
jmp 0x1006c1c
mov ecx, dword [ebp - 0x1c]
shl ecx, 1
mov dword [ebp - 0x1c], ecx
jmp 0x1006bee
mov edx, dword [ebp - 0xc]
and edx, 0xffff
cmp edx, 8
jne 0x1006c45
push 0
push 0x10
push 0
push 0
push 0x4c5
push 0
call fcn.01004e90
xor eax, eax
jmp 0x1006d53
mov eax, dword [0x100e6d4]
and eax, 8
test eax, eax
je 0x1006c8c
mov ecx, dword [ebp - 4]
and ecx, 0x8000
test ecx, ecx
je 0x1006c8c
mov edx, dword [ebp - 0xc]
and edx, 0xffff
mov eax, dword [edx*4 + 0x100e6e0]
shl eax, 1
mov dword [ebp - 0x10], eax
mov ecx, dword [0x100e6d8]
shr ecx, 2
mov edx, dword [0x100e6d8]
add edx, ecx
mov dword [ebp - 0x128], edx
jmp 0x1006caa
mov eax, dword [ebp - 0xc]
and eax, 0xffff
mov ecx, dword [eax*4 + 0x100e6e0]
mov dword [ebp - 0x10], ecx
mov edx, dword [0x100e6d8]
mov dword [ebp - 0x128], edx
mov eax, dword [ebp + 0xc]
and eax, 1
test eax, eax
je 0x1006ceb
mov ecx, dword [ebp + 0xc]
and ecx, 2
test ecx, ecx
je 0x1006ceb
mov edx, dword [ebp - 0x10]
add edx, dword [ebp - 0x128]
cmp edx, dword [ebp - 0x12c]
jbe 0x1006ce9
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x128]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 0x10]
push eax
call fcn.010027b0
jmp 0x1006d53
jmp 0x1006d44
mov ecx, dword [ebp + 0xc]
and ecx, 1
test ecx, ecx
je 0x1006d1c
mov edx, dword [ebp - 0x10]
cmp edx, dword [ebp - 0x12c]
jbe 0x1006d1a
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x128]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 0x10]
push eax
call fcn.010027b0
jmp 0x1006d53
jmp 0x1006d44
mov ecx, dword [ebp - 0x128]
cmp ecx, dword [ebp - 0x12c]
jbe 0x1006d44
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x128]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 0x10]
push edx
call fcn.010027b0
jmp 0x1006d53
mov dword [0x100e704], 0
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret 0xc