Function at 0x1004e1b
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 0x100502a
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 0x1004e7e
push ebx
push 0x10
push ebx
push ebx
push 0x4bc
push ebx
call fcn.01003ae7
call fcn.010055be
mov dword [0x100f904], eax
jmp 0x1004fb5
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 0x1004eec
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.010055be
mov dword [0x100f904], 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 0x1004f55
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 0x1004f66
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.010055be
mov dword [0x100f904], 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.01003ae7
lea eax, [ebp - 0x124]
push eax
call esi
jmp 0x1004fb5
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 0x1004f9f
shl edx, 1
inc ecx
cmp cx, 8
jb 0x1004f92
cmp cx, 8
jne 0x1004fb9
push ebx
push 0x10
push ebx
push ebx
push 0x4c5
push ebx
call fcn.01003ae7
xor eax, eax
jmp 0x100502d
test byte [0x100f8d4], 8
je 0x1004fe3
test byte [ebp - 0x17], 0x80
je 0x1004fe3
mov edx, dword [0x100f8d8]
movzx eax, cx
mov ecx, edx
mov eax, dword [eax*4 + 0x100f8e0]
shr ecx, 2
shl eax, 1
add ecx, edx
jmp 0x1004ff3
movzx eax, cx
mov ecx, dword [0x100f8d8]
mov eax, dword [eax*4 + 0x100f8e0]
mov edi, dword [ebp + 0xc]
and edi, 1
je 0x1005008
test byte [ebp + 0xc], 2
je 0x1005008
lea edx, [ecx + eax]
cmp edx, esi
jmp 0x1005012
cmp edi, ebx
je 0x1005010
cmp eax, esi
jmp 0x1005012
cmp ecx, esi
jbe 0x1005024
lea edx, [ebp - 0x14]
push edx
push ecx
push eax
push dword [ebp + 0x10]
call fcn.01002169
jmp 0x100502d
mov dword [0x100f904], ebx
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 0xc