Function at 0x1004f10
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 0x100511f
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 0x1004f73
push ebx
push 0x10
push ebx
push ebx
push 0x4bc
push ebx
call fcn.01003c23
call fcn.010056b9
mov dword [0x100b704], eax
jmp 0x10050aa
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 0x1004fe1
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.010056b9
mov dword [0x100b704], 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 0x100504a
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 0x100505b
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.010056b9
mov dword [0x100b704], 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.01003c23
lea eax, [ebp - 0x124]
push eax
call esi
jmp 0x10050aa
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 0x1005094
shl edx, 1
inc ecx
cmp cx, 8
jb 0x1005087
cmp cx, 8
jne 0x10050ae
push ebx
push 0x10
push ebx
push ebx
push 0x4c5
push ebx
call fcn.01003c23
xor eax, eax
jmp 0x1005122
test byte [0x100b6d4], 8
je 0x10050d8
test byte [ebp - 0x17], 0x80
je 0x10050d8
mov edx, dword [0x100b6d8]
movzx eax, cx
mov ecx, edx
mov eax, dword [eax*4 + 0x100b6e0]
shr ecx, 2
shl eax, 1
add ecx, edx
jmp 0x10050e8
movzx eax, cx
mov ecx, dword [0x100b6d8]
mov eax, dword [eax*4 + 0x100b6e0]
mov edi, dword [ebp + 0xc]
and edi, 1
je 0x10050fd
test byte [ebp + 0xc], 2
je 0x10050fd
lea edx, [ecx + eax]
cmp edx, esi
jmp 0x1005107
cmp edi, ebx
je 0x1005105
cmp eax, esi
jmp 0x1005107
cmp ecx, esi
jbe 0x1005119
lea edx, [ebp - 0x14]
push edx
push ecx
push eax
push dword [ebp + 0x10]
call fcn.010022a5
jmp 0x1005122
mov dword [0x100b704], ebx
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 0xc