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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x320
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
mov dword [ebp - 4], ebx
jne 0x1003fa0
xor eax, eax
inc eax
jmp 0x10041be
push esi
push edi
lea eax, [ebp - 0x120]
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 0x1003fe4
push ebx
push 0x10
push ebx
push ebx
push 0x4bc
push ebx
call fcn.01003943
call fcn.010035be
mov dword [0x100aa5c], eax
xor eax, eax
jmp 0x10041bc
lea eax, [ebp - 4]
push eax
push ebx
call fcn.01005f72
mov edi, eax
cmp edi, ebx
jne 0x1004049
push 0x7f
mov byte [ebp - 0x320], bl
xor eax, eax
pop ecx
lea edi, [ebp - 0x31f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.010035be
push ebx
mov dword [0x100aa5c], eax
push 0x200
lea eax, [ebp - 0x320]
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 - 0x320]
push eax
push dword [ebp + 8]
push 0x4b0
jmp 0x10040b2
push ebx
push ebx
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
jne 0x10040c6
push 0x7f
mov byte [ebp - 0x320], bl
pop ecx
lea edi, [ebp - 0x31f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.010035be
push ebx
mov dword [0x100aa5c], eax
push 0x200
lea eax, [ebp - 0x320]
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 - 0x320]
push eax
push dword [ebp + 8]
push 0x4f9
push ebx
call fcn.01003943
lea eax, [ebp - 0x120]
push eax
call esi
jmp 0x1003fdd
push 0x10013e4
push 0x10013d4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x1004100
cmp word [0x100aa64], 3
jne 0x1004100
push ebx
push ebx
lea ecx, [ebp - 0x18]
push ecx
push ebx
call eax
test eax, eax
je 0x1004100
cmp dword [ebp - 0x14], ebx
je 0x1004100
or edi, 0xffffffff
lea eax, [ebp - 0x120]
push eax
call esi
push 3
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov ecx, 0x200
xor eax, eax
cmp dword [ebp - 4], ecx
je 0x100412d
shl ecx, 1
inc eax
cmp ax, 8
jb 0x100411f
cmp ax, 8
jne 0x1004148
push ebx
push 0x10
push ebx
push ebx
push 0x4c5
push ebx
call fcn.01003943
jmp 0x1003fdd
test byte [0x100b494], 8
je 0x1004172
test byte [ebp - 0xf], 0x80
je 0x1004172
mov edx, dword [0x100b498]
movzx eax, ax
mov eax, dword [eax*4 + 0x100bbc0]
mov ecx, edx
shr ecx, 2
shl eax, 1
add ecx, edx
jmp 0x1004182
mov ecx, dword [0x100b498]
movzx eax, ax
mov eax, dword [eax*4 + 0x100bbc0]
mov esi, dword [ebp + 0xc]
and esi, 1
je 0x10041a7
test byte [ebp + 0xc], 2
je 0x10041a7
lea edx, [ecx + eax]
cmp edx, edi
jbe 0x10041b3
lea edx, [ebp - 0xc]
push edx
push ecx
push eax
push dword [ebp + 0x10]
call fcn.01002006
jmp 0x10041bc
cmp esi, ebx
je 0x10041af
cmp eax, edi
jmp 0x1004195
cmp ecx, edi
jmp 0x1004195
xor eax, eax
mov dword [0x100aa5c], ebx
inc eax
pop edi
pop esi
pop ebx
leave
ret 0xc