Function at 0x10051aa0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10183243
mov eax, dword fs:[0]
push eax
sub esp, 0x468
mov eax, dword [0x101dd594]
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 dword [ebp - 0x46c], 0
mov dword [ebp - 0x328], 0
mov dword [ebp - 0x33c], 0
mov dword [ebp - 0x338], 0
mov dword [ebp - 0x334], 0
mov dword [ebp - 0x32c], 0
mov dword [ebp - 0x330], 0
call fcn.1001b540
mov ecx, eax
test ecx, ecx
je 0x10051f9c
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x450], eax
mov eax, 0x10193fcc
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x450]
test eax, 0xffff0000
jne 0x10051b55
movzx eax, ax
push eax
call fcn.100183a0
jmp 0x10051b61
push 0
push 0x10193fcc
call fcn.10020080
lea eax, [ebp - 0x33c]
mov dword [ebp - 4], 1
xorps xmm0, xmm0
push eax
movlpd qword [ebp - 0x458], xmm0
call dword [sym.imp.SHELL32.dll_SHGetDesktopFolder]
or ebx, 0xffffffff
test eax, eax
js 0x10051f2d
lea eax, [ebp - 0x330]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
js 0x10051f2d
lea eax, [ebp - 0x334]
push eax
push 0
push 0
push 0xa
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderLocation]
test eax, eax
js 0x10051f2d
mov eax, dword [ebp - 0x33c]
lea edx, [ebp - 0x328]
push edx
push 0x1019c990
push 0
push dword [ebp - 0x334]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
test eax, eax
js 0x10051f2d
mov eax, dword [ebp - 0x328]
lea edx, [ebp - 0x338]
push edx
push 0xe0
push 0
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
mov esi, dword [ebp - 0x458]
mov edi, dword [ebp - 0x450]
mov dword [ebp - 0x464], esi
test eax, eax
js 0x10051ed8
mov edx, dword [ebp - 0x454]
mov dword [ebp - 0x468], edx
nop word [eax + eax]
mov eax, dword [ebp - 0x338]
lea edx, [ebp - 0x21c]
push edx
lea edx, [ebp - 0x32c]
push edx
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0xc]
cmp eax, 1
je 0x10051ee6
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x32c]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov eax, dword [ebp - 0x328]
lea edx, [ebp - 0x324]
push edx
push 0
push dword [ebp - 0x32c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x2c]
test eax, eax
js 0x10051c30
xor ebx, ebx
mov dword [ebp - 0x470], ebx
nop
mov eax, dword [ebp - 0x328]
lea edx, [ebp - 0x44c]
push edx
push ebx
push dword [ebp - 0x32c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x48]
test eax, eax
js 0x10051e9d
call fcn.1001b540
mov ecx, eax
test ecx, ecx
je 0x10051f9c
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x460], esi
mov eax, dword [ebp - 0x444]
mov byte [ebp - 4], 2
sub eax, 0
je 0x10051dba
sub eax, 2
jne 0x10051e04
lea eax, [ebp - 0x440]
mov byte [ebp - 4], 3
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
push 0
mov esi, eax
lea eax, [ebp - 0x440]
push esi
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push eax
push 0
lea ecx, [ebp - 0x45c]
mov dword [ebp - 0x474], eax
mov dword [ebp - 0x45c], 0
call fcn.1001c470
or dword [ebp - 0x46c], 1
mov ecx, dword [ebp - 0x45c]
mov dword [ebp - 0x454], eax
cmp dword [ecx - 4], 1
jle 0x10051d62
push dword [ecx - 0xc]
lea ecx, [ebp - 0x45c]
call fcn.10017f50
mov ecx, dword [ebp - 0x45c]
push dword [ebp - 0x474]
lea eax, [ebp - 0x440]
push ecx
push esi
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push dword [ebp - 0x454]
lea ecx, [ebp - 0x460]
call fcn.1001c9f0
and dword [ebp - 0x46c], 0xfffffffe
or eax, 0xffffffff
mov edx, dword [ebp - 0x45c]
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10051dfe
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10051dfe
mov edx, dword [ebp - 0x440]
test edx, edx
jne 0x10051dc8
xor eax, eax
jmp 0x10051ddf
mov eax, edx
lea esi, [eax + 2]
nop dword [eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10051dd0
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x460]
call fcn.10020080
mov eax, dword [ebp - 0x330]
push dword [ebp - 0x440]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov esi, dword [ebp - 0x460]
cmp ebx, 3
jne 0x10051e71
lea ecx, [esi - 0x10]
lea ebx, [edi - 0x10]
cmp ecx, ebx
je 0x10051e6b
cmp dword [ebx + 0xc], 0
lea edi, [ebx + 0xc]
jl 0x10051e56
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x10051e56
push ecx
call fcn.1001d450
add esp, 4
mov dword [ebp - 0x454], eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x10051e4b
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x454]
lea edi, [eax + 0x10]
mov dword [ebp - 0x450], edi
jmp 0x10051e6b
push dword [esi - 0xc]
lea ecx, [ebp - 0x450]
push esi
call fcn.10020080
mov edi, dword [ebp - 0x450]
mov ebx, dword [ebp - 0x470]
inc ebx
mov byte [ebp - 4], 1
mov dword [ebp - 0x470], ebx
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10051e94
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
cmp ebx, 4
jl 0x10051c90
push ecx
lea eax, [edi - 0x10]
mov esi, esp
push eax
mov dword [ebp - 0x454], esi
call fcn.1001d450
add esp, 4
add eax, 0x10
mov dword [esi], eax
call fcn.100511d0
mov esi, dword [ebp - 0x464]
add esp, 4
add esi, eax
mov dword [ebp - 0x464], esi
adc dword [ebp - 0x468], edx
jmp 0x10051c30
mov eax, dword [ebp - 0x454]
mov dword [ebp - 0x468], eax
jmp 0x10051ee9
or ebx, 0xffffffff
mov ecx, dword [ebp - 0x330]
test ecx, ecx
je 0x10051f0b
push dword [ebp - 0x334]
mov eax, dword [ecx]
push ecx
call dword [eax + 0x14]
mov eax, dword [ebp - 0x330]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov ecx, dword [ebp - 0x338]
test ecx, ecx
je 0x10051f1b
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [ebp - 0x328]
test ecx, ecx
je 0x10051f56
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
jmp 0x10051f56
mov edi, dword [ebp - 0x450]
xorps xmm0, xmm0
movlpd qword [ebp - 0x458], xmm0
mov eax, dword [ebp - 0x454]
mov esi, dword [ebp - 0x458]
mov dword [ebp - 0x468], eax
mov dword [ebp - 0x464], esi
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x10051f78
mov ecx, dword [edi]
push edi
mov esi, dword [ecx]
call dword [esi + 4]
mov esi, dword [ebp - 0x464]
mov edx, dword [ebp - 0x468]
mov eax, esi
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.10128191
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.10017a40
int3