Function at 0x40f996
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe70
mov eax, dword [0x43c068]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, 0x104
mov dword [ebp - 0xe70], ecx
push esi
xor ebx, ebx
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.00416590
push esi
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.00416590
add esp, 0x18
lea eax, [ebp - 0x108]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
movsx eax, byte [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push str.._c:
push eax
call fcn.0040ff68
add esp, 0xc
lea eax, [ebp - 0x20c]
push ebx
push ebx
push 3
push ebx
push 7
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40fa28
mov al, 1
jmp 0x40fbf5
push edi
push 8
pop ecx
push ebx
xor eax, eax
mov dword [ebp - 0xe6c], ebx
lea edi, [ebp - 0xe68]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0xe6c]
push eax
push 0x20
lea eax, [ebp - 0xe68]
push eax
push ebx
push ebx
push 0x560000
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40fa66
mov bl, 1
jmp 0x40fbeb
push 6
pop ecx
push ebx
xor eax, eax
lea edi, [ebp - 0xe48]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0xe6c]
push eax
push 0x18
lea eax, [ebp - 0xe48]
push eax
push ebx
push ebx
push 0x74080
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40fa9d
mov bl, 2
jmp 0x40fbeb
mov cl, byte [ebp - 0xe60]
lea edi, [ebp - 0xe23]
mov al, cl
mov dword [ebp - 0xe30], 0x200
and al, 1
mov dword [ebp - 0xe2c], 0x10100
or al, 0xfa
mov byte [ebp - 0xe28], bl
shl al, 4
mov byte [ebp - 0xe27], al
mov al, byte [ebp - 0xe45]
shr al, cl
and al, 0x10
mov byte [ebp - 0xe25], bl
neg al
mov byte [ebp - 0xe24], cl
push 0x211
sbb al, al
and al, 0xb5
add al, 0xec
mov byte [ebp - 0xe26], al
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.00417f7e
mov dword [esp], 0x211
mov edi, eax
push ebx
push edi
call fcn.00416590
add esp, 0xc
lea eax, [ebp - 0xe6c]
push ebx
push eax
push 0x211
push edi
push 0x21
lea eax, [ebp - 0xe30]
push eax
push 0x7c088
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40fb48
mov bl, 3
jmp 0x40fbe0
mov ecx, ebx
movzx eax, word [edi + ecx*2 + 0x10]
mov dword [ebp + ecx*4 - 0xe0c], eax
inc ecx
cmp ecx, 0x100
jl 0x40fb4a
lea eax, [ebp - 0xa0c]
push eax
push 0x13
lea eax, [ebp - 0xe0c]
push 0xa
push eax
call fcn.0040f8d2
lea eax, [ebp - 0x60c]
push eax
push 0x2e
lea eax, [ebp - 0xe0c]
push 0x1b
push eax
call fcn.0040f8d2
lea ecx, [ebp - 0x60c]
add esp, 0x20
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40fb99
sub ecx, edx
lea eax, [ebp - 0x60c]
push ecx
push eax
push dword [ebp - 0xe70]
call fcn.00402a1e
lea ecx, [ebp - 0xa0c]
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40fbc1
sub ecx, edx
lea eax, [ebp - 0xa0c]
push ecx
push eax
push dword [ebp - 0xe70]
call fcn.00402a1e
add esp, 0xc
test edi, edi
je 0x40fbeb
push edi
call fcn.00417f89
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, bl
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00413b09
leave
ret