Function at 0x40022ac0
Capabilities:
Get common file path

Disassembly:
mov eax, 0x4007222c
call fcn.4006f3a0
sub esp, 0x264
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x28], ecx
push 0x208
lea eax, [ebp - 0x270]
mov dword [ebp - 0x2c], ebx
push ebx
push eax
call fcn.40054740
add esp, 0xc
lea eax, [ebp - 0x270]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x270]
push eax
lea ecx, [ebp - 0x68]
call fcn.4004d710
and dword [ebp - 4], ebx
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x68]
call fcn.4004dd60
push str.Sleipnir5
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.400069d1
push 0x2e
mov byte [ebp - 4], 2
pop esi
mov edi, dword [ebp - 0x20]
cmp dword [edi - 0xc], 1
jl 0x40022b6f
push 1
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x20]
call fcn.4000d78b
or ebx, 1
mov ecx, dword [eax]
cmp dword [ecx - 0xc], 1
jne 0x40022b6f
push 0
mov ecx, eax
call fcn.4001698f
movzx eax, ax
mov byte [ebp - 0xd], 1
cmp ax, si
je 0x40022b73
mov byte [ebp - 0xd], 0
test bl, 1
je 0x40022b86
mov ecx, dword [ebp - 0x14]
and ebx, 0xfffffffe
lea ecx, [ecx - 0x10]
call fcn.40004636
cmp byte [ebp - 0xd], 0
je 0x40022bbe
mov eax, dword [edi - 0xc]
lea ecx, [ebp - 0x20]
dec eax
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.4000d7d4
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call fcn.400088ff
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.40004636
jmp 0x40022b38
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], 1
jl 0x40022bf5
push 1
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x18]
call fcn.4000d78b
or ebx, 2
mov ecx, dword [eax]
cmp dword [ecx - 0xc], 1
jne 0x40022bf5
push 0
mov ecx, eax
call fcn.4001698f
movzx eax, ax
mov byte [ebp - 0xd], 1
cmp ax, si
je 0x40022bf9
mov byte [ebp - 0xd], 0
test bl, 2
je 0x40022c0c
mov ecx, dword [ebp - 0x24]
and ebx, 0xfffffffd
lea ecx, [ecx - 0x10]
call fcn.40004636
cmp byte [ebp - 0xd], 0
je 0x40022c47
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x18]
mov eax, dword [eax - 0xc]
dec eax
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.4000d7d4
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.400088ff
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.40004636
jmp 0x40022bbe
call fcn.40001ce1
push eax
lea ecx, [ebp - 0x14]
call fcn.40006f05
mov ebx, 0x104
mov byte [ebp - 4], 5
push ebx
lea ecx, [ebp - 0x14]
call fcn.40006b63
push ebx
lea ecx, [ebp - 0x14]
mov esi, eax
call fcn.40007032
push esi
xor eax, eax
push eax
push eax
push 0x2e
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x40022cbd
call fcn.40001ce1
mov ecx, dword [ebp - 0x28]
push eax
call fcn.40006f05
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.40004636
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.40004636
lea ecx, [edi - 0x10]
call fcn.40004636
lea ecx, [ebp - 0x68]
call fcn.4004d9d0
mov eax, dword [ebp - 0x28]
jmp 0x40022d3b
push 0xffffffffffffffff
lea ecx, [ebp - 0x14]
call fcn.40006b9b
mov esi, dword [ebp - 0x14]
lea ecx, [ebp - 0x1c]
push esi
call fcn.400069d1
push edi
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call fcn.40009edd
push dword [ebp - 0x18]
lea ecx, [ebp - 0x1c]
call fcn.40009edd
push str.UserProfiles.ini
lea ecx, [ebp - 0x1c]
call fcn.40009edd
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx - 0x10]
call fcn.400073ec
mov ecx, dword [ebp - 0x1c]
add eax, 0x10
mov ebx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
mov dword [ebx], eax
call fcn.40004636
lea ecx, [esi - 0x10]
call fcn.40004636
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.40004636
lea ecx, [edi - 0x10]
call fcn.40004636
lea ecx, [ebp - 0x68]
call fcn.4004d9d0
mov eax, ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret