Function at 0x40f1b9
Capabilities:
Get common file path

Disassembly:
mov eax, 0x5899c2
call fcn.00414dac
sub esp, 0x234
mov eax, dword [0x59f55c]
push ebx
push esi
push edi
mov dword [ebp - 0x14], eax
xor ebx, ebx
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], ebx
call fcn.0044aac0
mov eax, dword [0x59f55c]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], eax
xor esi, esi
cmp dword [ebp + 8], ebx
mov byte [ebp - 4], 3
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
je 0x40f439
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x23e]
mov word [ebp - 0x240], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x240]
push 0x103
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp dword [ebp + 0xc], 1
jne 0x40f272
call fcn.0040f47c
test eax, eax
je 0x40f272
lea eax, [ebp - 0x240]
push 0x5c
push eax
call fcn.00415f16
mov edi, eax
pop ecx
cmp edi, ebx
pop ecx
je 0x40f439
push edi
call fcn.00414e6e
shl eax, 1
push eax
push ebx
push edi
call fcn.00413c50
push str.Syswow64
push edi
call fcn.00414e49
add esp, 0x18
lea eax, [ebp - 0x240]
push eax
call fcn.00414e6e
test eax, eax
pop ecx
je 0x40f439
mov dword [ebp + 0xc], ebx
call fcn.0040f47c
test eax, eax
je 0x40f2b8
push 0x14
call fcn.0057985d
pop ecx
mov dword [ebp + 0xc], eax
cmp eax, ebx
mov byte [ebp - 4], 4
je 0x40f2af
mov ecx, eax
call fcn.0040c172
jmp 0x40f2b1
xor eax, eax
mov byte [ebp - 4], 3
mov dword [ebp + 0xc], eax
push dword [ebp + 8]
lea ecx, [ebp - 0x18]
call fcn.004453c0
lea eax, [ebp - 0x20]
mov edi, 0x5d682c
push eax
lea eax, [ebp + 8]
push edi
push eax
lea ecx, [ebp - 0x18]
call fcn.00449940
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 5
call fcn.004452d0
mov byte [ebp - 4], 3
lea ecx, [ebp + 8]
call fcn.00445140
mov eax, dword [ebp - 0x10]
cmp dword [eax - 8], ebx
je 0x40f3a6
lea ecx, [ebp - 0x14]
call fcn.00444eb0
push 0x5c
push dword [ebp - 0x10]
call fcn.00415f16
pop ecx
cmp eax, ebx
pop ecx
jne 0x40f333
push dword [ebp - 0x10]
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x14]
push 0x5d3c38
push eax
call fcn.004480c0
add esp, 0x10
jmp 0x40f33f
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x14]
push eax
call fcn.004452d0
push ebx
push ebx
push 3
push ebx
push 3
push SysReAllocStringLen
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x40f37c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x38]
push eax
push dword [ebp - 0x34]
call fcn.0044b0d0
push dword [ebp - 0x14]
call fcn.00414e6e
pop ecx
lea esi, [esi + eax + 1]
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x18]
push eax
lea eax, [ebp - 0x28]
push edi
push eax
call fcn.00449940
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.004452d0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x28]
jmp 0x40f2ed
mov ecx, dword [ebp + 0xc]
cmp ecx, ebx
je 0x40f3b3
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [ebp - 0x34]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x40f439
cmp esi, ebx
je 0x40f439
lea eax, [esi + 1]
mov dword [ebp + 0xc], eax
lea esi, [eax + eax]
push esi
call fcn.0057985d
mov edi, eax
pop ecx
cmp edi, ebx
je 0x40f439
push esi
push ebx
push edi
call fcn.00413c50
add esp, 0xc
cmp dword [ebp + 8], ebx
jle 0x40f43b
mov eax, dword [ebp - 0x38]
push dword [eax + ebx*4]
call fcn.00414e6e
pop ecx
mov ecx, dword [ebp - 0x1c]
lea esi, [ecx + eax]
lea ecx, [esi + 1]
cmp ecx, dword [ebp + 0xc]
mov dword [ebp - 0x24], ecx
jae 0x40f43b
mov ecx, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ecx + ebx*4]
lea eax, [edi + eax*2]
push ecx
push eax
call fcn.00415875
push 1
lea eax, [edi + esi*2]
push 0x5d682c
push eax
call fcn.00415875
mov eax, dword [ebp - 0x24]
add esp, 0x18
inc ebx
mov dword [ebp - 0x1c], eax
cmp ebx, dword [ebp + 8]
jl 0x40f3e7
jmp 0x40f43b
xor edi, edi
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call fcn.00445140
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.00445140
and byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.0044aad0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00445140
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret