Function at 0x4012c0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402d4e
mov eax, dword fs:[0]
push eax
sub esp, 0x260
mov eax, dword [0x405004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x23c], ecx
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x40163c
xor eax, eax
mov dword [ebp - 0x220], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401360
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x230]
call fcn.004019b0
mov byte [ebp - 4], 1
lea edx, [ebp - 0x230]
cmp dword [ebp - 0x21c], 8
mov esi, dword [ebp - 0x220]
cmovae edx, dword [ebp - 0x230]
test esi, esi
je 0x40147c
or ecx, 0xffffffff
lea eax, [esi - 1]
cmp eax, ecx
cmovb ecx, eax
cmp word [edx + ecx*2], 0x5c
lea ecx, [edx + ecx*2]
je 0x4013d1
nop dword [eax]
cmp ecx, edx
je 0x40147c
sub ecx, 2
cmp word [ecx], 0x5c
jne 0x4013c0
sub ecx, edx
sar ecx, 1
cmp ecx, 0xffffffff
je 0x40147c
xor eax, eax
mov dword [ebp - 0x244], 0
inc ecx
mov word [ebp - 0x254], ax
cmp esi, ecx
mov dword [ebp - 0x240], 7
lea eax, [ebp - 0x230]
cmovb ecx, esi
cmp dword [ebp - 0x21c], 8
push ecx
cmovae eax, dword [ebp - 0x230]
lea ecx, [ebp - 0x254]
push eax
call fcn.004019b0
lea eax, [ebp - 0x254]
push eax
lea ecx, [ebp - 0x230]
call fcn.00401920
mov edx, dword [ebp - 0x240]
cmp edx, 8
jb 0x401476
mov ecx, dword [ebp - 0x254]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40146c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40146c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00401fc7
add esp, 8
mov esi, dword [ebp - 0x220]
cmp dword [ebp + 0x18], 0
je 0x4015dd
test esi, esi
je 0x4015dd
push ecx
lea edx, [ebp - 0x230]
lea ecx, [ebp - 0x26c]
call fcn.00401b00
add esp, 4
mov esi, eax
mov byte [ebp - 4], 2
lea edx, [ebp + 8]
cmp dword [ebp + 0x1c], 8
mov edi, dword [esi + 0x10]
cmovae edx, dword [ebp + 8]
mov eax, dword [esi + 0x14]
mov ecx, dword [ebp + 0x18]
sub eax, edi
mov dword [ebp - 0x238], edi
cmp ecx, eax
ja 0x401504
cmp dword [esi + 0x14], 8
lea eax, [ecx + edi]
mov dword [ebp - 0x234], eax
mov edi, esi
mov dword [esi + 0x10], eax
jb 0x4014df
mov edi, dword [esi]
lea eax, [ecx + ecx]
push eax
mov eax, dword [ebp - 0x238]
push edx
lea eax, [edi + eax*2]
push eax
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x234]
add esp, 0xc
xor ecx, ecx
mov word [edi + eax*2], cx
jmp 0x40151d
push ecx
push edx
mov byte [ebp - 0x234], 0
push dword [ebp - 0x234]
push ecx
mov ecx, esi
call fcn.00401cc0
mov esi, eax
movups xmm0, xmmword [esi]
mov ecx, dword [ebp - 0x23c]
xor eax, eax
movups xmmword [ebp - 0x254], xmm0
movq xmm0, qword [esi + 0x10]
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
lea eax, [ebp - 0x254]
push eax
movq qword [ebp - 0x244], xmm0
call fcn.00401920
mov edx, dword [ebp - 0x240]
cmp edx, 8
jb 0x40159b
mov ecx, dword [ebp - 0x254]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401591
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401591
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00401fc7
add esp, 8
mov edx, dword [ebp - 0x258]
cmp edx, 8
jb 0x4015dd
mov ecx, dword [ebp - 0x26c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4015d3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4015d3
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00401fc7
add esp, 8
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x40161f
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401615
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401615
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00401fc7
add esp, 8
xor eax, eax
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
mov edx, dword [ebp + 0x1c]
cmp edx, 8
jb 0x401678
mov ecx, dword [ebp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40166e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40166e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00401fc7
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00401f86
mov esp, ebp
pop ebp
ret