Function at 0x5218c0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6251ed
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x659af8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x70], eax
xor eax, eax
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x24], 0x49a260
mov dword [ebp - 0x20], 0x49a268
mov dword [ebp - 0x1c], 0x49a274
mov dword [ebp - 0x18], 0x49a290
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 7
mov word [ebp - 0x3c], ax
mov dword [ebp - 4], eax
xor esi, esi
mov eax, 0x49a260
nop word [eax + eax]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.00521cc0
add esp, 8
mov ecx, dword [ebp - 0x44]
mov byte [ebp - 4], 1
test ecx, ecx
je 0x5219ef
cmp dword [ebp - 0x40], 8
lea eax, [ebp - 0x54]
push ecx
cmovae eax, dword [ebp - 0x54]
lea ecx, [ebp - 0x3c]
push eax
call fcn.00507040
cmp esi, 2
jl 0x521983
push 0x49a2a8
lea ecx, [ebp - 0x3c]
call fcn.0051d2d0
mov dword [ebp - 0x60], 0
call fcn.0051c4f0
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x78]
push eax
call fcn.005216d0
mov eax, dword [ebp - 0x78]
add esp, 0xc
test eax, eax
je 0x5219d8
cmp eax, 1
je 0x5219d8
cmp dword [ebp - 0x60], 0
jne 0x5219d8
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.005216d0
add esp, 0xc
cmp dword [ebp - 0x68], 3
jne 0x5219d8
cmp dword [ebp - 0x60], 0
je 0x521a44
cmp dword [ebp - 0x28], 8
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x2c], 0
cmovae eax, dword [ebp - 0x3c]
xor ecx, ecx
mov word [eax], cx
mov edx, dword [ebp - 0x40]
mov byte [ebp - 4], 0
cmp edx, 8
jb 0x521a35
mov ecx, dword [ebp - 0x54]
lea edx, [edx*2 + 2]
mov eax, ecx
mov byte [ebp - 4], 3
cmp edx, 0x1000
jb 0x521a27
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x521cba
push edx
push ecx
call fcn.006084e7
add esp, 8
mov byte [ebp - 4], 0
mov eax, dword [ebp + esi*4 - 0x20]
inc esi
test eax, eax
jne 0x521940
jmp 0x521a61
mov eax, dword [ebp - 0x40]
mov byte [ebp - 4], 2
cmp eax, 8
jb 0x521a5d
inc eax
lea ecx, [ebp - 0x54]
push eax
push dword [ebp - 0x54]
call fcn.004c8530
mov byte [ebp - 4], 0
cmp dword [ebp - 0x2c], 0
jne 0x521b53
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor esi, esi
mov dword [ebp - 0x5c], eax
xor edi, edi
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0
test eax, eax
je 0x521ac8
cmp eax, 0x7fffffff
ja 0x521cb5
push eax
lea ecx, [ebp - 0x6c]
call fcn.004ce090
mov esi, eax
mov eax, dword [ebp - 0x5c]
add eax, eax
mov dword [ebp - 0x6c], esi
push eax
push 0
push esi
lea edi, [esi + eax]
mov dword [ebp - 0x64], edi
call fcn.0060a6d0
add esp, 0xc
mov dword [ebp - 0x68], edi
mov byte [ebp - 4], 5
cmp esi, edi
je 0x521ba8
sub edi, esi
mov eax, edi
sar eax, 1
push eax
push esi
mov dword [ebp - 0x5c], eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x521baa
mov edx, dword [ebp - 0x6c]
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x521af5
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x3c]
call fcn.00507040
push 0x49a2a8
lea ecx, [ebp - 0x3c]
call fcn.0051d2d0
test esi, esi
je 0x521b50
mov ecx, dword [ebp - 0x5c]
add ecx, ecx
mov byte [ebp - 4], 8
cmp ecx, 0x1000
jb 0x521b46
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x521cba
mov esi, edx
push ecx
push esi
call fcn.006084e7
add esp, 8
mov edi, dword [ebp - 0x58]
xor eax, eax
mov dword [edi + 0x10], 0
mov word [edi], ax
lea eax, [ebp - 0x3c]
mov dword [edi + 0x14], 7
cmp edi, eax
je 0x521c6f
movups xmm0, xmmword [ebp - 0x3c]
mov dword [edi + 0x10], 0
xor eax, eax
mov dword [edi + 0x14], 7
xor ecx, ecx
movups xmmword [edi], xmm0
mov word [ebp - 0x3c], cx
movq xmm0, qword [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
mov eax, 7
movq qword [edi + 0x10], xmm0
mov dword [ebp - 0x28], eax
jmp 0x521c72
sub edi, esi
push 0x49a2b4
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00520de0
mov eax, dword [ebp - 0x58]
xor ecx, ecx
add esp, 0xc
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
test esi, esi
je 0x521c0b
sar edi, 1
add edi, edi
mov byte [ebp - 4], 6
cmp edi, 0x1000
jb 0x521c01
mov ecx, dword [esi - 4]
add edi, 0x23
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x521cba
mov esi, ecx
push edi
push esi
call fcn.006084e7
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x521c4f
mov ecx, dword [ebp - 0x3c]
lea edx, [edx*2 + 2]
mov eax, ecx
mov dword [ebp - 4], 7
cmp edx, 0x1000
jb 0x521c45
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x521cba
push edx
push ecx
call fcn.006084e7
add esp, 8
mov edi, dword [ebp - 0x58]
mov eax, edi
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.00608a00
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
cmp eax, 8
jb 0x521c52
mov ecx, dword [ebp - 0x3c]
lea edx, [eax*2 + 2]
mov eax, ecx
mov dword [ebp - 4], 0xa
cmp edx, 0x1000
jb 0x521ca9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x521cba
push edx
push ecx
call fcn.006084e7
add esp, 8
jmp 0x521c52
call fcn.004c7d60
call fcn.00540ccc
int3