Function at 0x402560
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 0x40261c
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]
xor edx, edx
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 0x40266d
push 0
push 0
push str.Error_Code_3
call fcn.004066f2
mov eax, dword [ebp - 0x654]
cmp dword [eax - 4], 1
jle 0x402687
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 0x4026cc
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 0x4026a1
lea eax, [ebp - 0x240]
push 0x2e
push eax
call fcn.00514ffe
add esp, 8
test eax, eax
je 0x4026da
xor ecx, ecx
mov word [eax], cx
jmp 0x4026da
push 0
push 0
push str.Error_Code_4
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
jmp 0x402710
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x402710
lea edi, [ebp - 0x240]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x402726
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 0x402750
mov eax, dword [str..dll]
mov dword [ecx], eax
mov eax, dword [0x57591c]
mov dword [ecx + 4], eax
mov ax, word [0x575920]
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 0x4027aa
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