Function at 0x4022f0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x543feb
mov eax, dword fs:[0]
push eax
sub esp, 0x64c
mov eax, dword [0x5965b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x448], ax
lea eax, [ebp - 0x446]
push eax
mov dword [ebp - 0x658], 0
call fcn.005170e0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x650], ax
lea eax, [ebp - 0x64e]
push eax
call fcn.005170e0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x240], ax
lea eax, [ebp - 0x23e]
push eax
call fcn.005170e0
add esp, 0x24
lea eax, [ebp - 0x448]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x448]
push 0x5c
push eax
call fcn.00514ffe
add esp, 8
test eax, eax
je 0x4023ac
xor ecx, ecx
mov word [eax], cx
push 0
push 0x25
lea eax, [ebp - 0x650]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov edx, 1
lea ecx, [ebp - 0x654]
mov dword [ebp - 0x654], 0
call fcn.004027d0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x654]
cmp dword [eax - 0xc], 0
jne 0x402400
push 0
push 0
push str.Error_Code_1
call fcn.004066f2
mov eax, dword [ebp - 0x654]
cmp dword [eax - 4], 1
jle 0x40241a
push dword [eax - 0xc]
lea ecx, [ebp - 0x654]
call fcn.00404570
mov eax, dword [ebp - 0x654]
push 0x5c
push eax
call fcn.00514ffe
add esp, 8
test eax, eax
je 0x40245f
lea ecx, [eax + 2]
lea edx, [ebp - 0x240]
sub edx, ecx
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x402434
lea eax, [ebp - 0x240]
push 0x2e
push eax
call fcn.00514ffe
add esp, 8
test eax, eax
je 0x40246d
xor ecx, ecx
mov word [eax], cx
jmp 0x40246d
push 0
push 0
push str.Error_Code_2
call fcn.004066f2
xorps xmm0, xmm0
xor eax, eax
lea ecx, [ebp - 0x38]
mov word [ebp - 0x38], ax
movq qword [ebp - 0x36], xmm0
movq qword [ebp - 0x2e], xmm0
movq qword [ebp - 0x26], xmm0
movq qword [ebp - 0x1e], xmm0
mov dword [ebp - 0x16], eax
mov word [ebp - 0x12], ax
call fcn.00403be0
lea edx, [ebp - 0x38]
mov esi, edx
mov edi, edi
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4024a0
lea edi, [ebp - 0x240]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4024b6
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x240]
add ecx, 0xfffffffe
lea esp, [esp]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x4024e0
mov eax, dword [str..exe]
mov dword [ecx], eax
mov eax, dword [0x5758d8]
mov dword [ecx + 4], eax
mov ax, word [0x5758dc]
mov word [ecx + 8], ax
lea eax, [ebp - 0x240]
push eax
mov ecx, ebx
call fcn.00403f00
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x654]
add esi, 0xfffffff0
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40253a
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00514e2d
mov esp, ebp
pop ebp
ret