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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x324
mov eax, dword [0x100b2d0]
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], eax
mov dword [ebp - 0x31c], edi
mov dword [ebp - 0x318], ebx
jne 0x100459d
xor eax, eax
inc eax
jmp 0x10047a0
push esi
lea eax, [ebp - 0x310]
push eax
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryA]
mov esi, dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
push edi
call esi
test eax, eax
jne 0x10045de
push ebx
push 0x10
push ebx
push ebx
push 0x4bc
push ebx
call fcn.01003ebe
call fcn.01003aa1
mov dword [0x100ba5c], eax
xor eax, eax
jmp 0x100479f
lea eax, [ebp - 0x318]
push eax
push ebx
call fcn.01006a45
cmp eax, ebx
mov dword [ebp - 0x314], eax
jne 0x100464d
push 0x7f
mov byte [ebp - 0x20c], bl
xor eax, eax
pop ecx
lea edi, [ebp - 0x20b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.01003aa1
push ebx
mov dword [0x100ba5c], eax
push 0x200
lea eax, [ebp - 0x20c]
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
push 0x10
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x31c]
push 0x4b0
jmp 0x10046bf
push ebx
push ebx
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x324]
push eax
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.DLL_GetVolumeInformationA]
test eax, eax
jne 0x10046d3
push 0x7f
mov byte [ebp - 0x20c], bl
pop ecx
lea edi, [ebp - 0x20b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.01003aa1
push ebx
mov dword [0x100ba5c], eax
push 0x200
lea eax, [ebp - 0x20c]
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
push 0x10
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x31c]
push 0x4f9
push ebx
call fcn.01003ebe
lea eax, [ebp - 0x310]
push eax
call esi
jmp 0x10045d7
lea eax, [ebp - 0x310]
push eax
call esi
push 3
push edi
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpynA]
mov ecx, 0x200
xor eax, eax
cmp dword [ebp - 0x318], ecx
je 0x1004701
shl ecx, 1
inc eax
cmp ax, 8
jb 0x10046f0
cmp ax, 8
jne 0x100471c
push ebx
push 0x10
push ebx
push ebx
push 0x4c5
push ebx
call fcn.01003ebe
jmp 0x10045d7
test byte [0x100c494], 8
je 0x1004749
test byte [ebp - 0x31f], 0x80
je 0x1004749
mov edx, dword [0x100c498]
movzx eax, ax
mov eax, dword [eax*4 + 0x100cbc0]
mov ecx, edx
shr ecx, 2
shl eax, 1
add ecx, edx
jmp 0x1004759
mov ecx, dword [0x100c498]
movzx eax, ax
mov eax, dword [eax*4 + 0x100cbc0]
mov esi, dword [ebp + 0xc]
and esi, 1
je 0x1004782
test byte [ebp + 0xc], 2
je 0x1004782
lea edx, [ecx + eax]
cmp edx, dword [ebp - 0x314]
jbe 0x1004796
lea edx, [ebp - 0xc]
push edx
push ecx
push eax
push dword [ebp + 0x10]
call fcn.010020a4
jmp 0x100479f
cmp esi, ebx
je 0x100478e
cmp eax, dword [ebp - 0x314]
jmp 0x1004770
cmp ecx, dword [ebp - 0x314]
jmp 0x1004770
xor eax, eax
mov dword [0x100ba5c], ebx
inc eax
pop esi
mov ecx, dword [ebp - 4]
pop edi
pop ebx
call fcn.010064de
leave
ret 0xc