Function at 0x4a3e30
Capabilities:
Get common file path

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xa0
mov eax, dword [esp + 0xb4]
mov edx, dword [eax + 4]
test edx, edx
je 0x4a45af
mov esi, dword [esp + 0xb8]
mov ecx, dword [eax]
lea eax, [ecx + edx]
cmp esi, 1
mov ebp, edx
jne 0x4a3e6f
cmp edx, 8
jae 0x4a404f
mov edi, ecx
jmp 0x4a45c5
cmp esi, 3
mov edx, 0x5c
mov ebx, 0x2f
cmove ebx, edx
mov edx, ebp
mov edi, ebp
and edi, 3
jne 0x4a3fea
cmp edx, 4
jae 0x4a400e
mov ebx, dword [esp + 0xb4]
mov eax, dword [ebx]
cmp byte [eax], 0x7e
jne 0x4a45af
cmp dword [ebx + 4], 1
je 0x4a3ebf
movzx eax, byte [eax + 1]
cmp eax, 0x5c
je 0x4a3ebf
cmp eax, 0x2f
jne 0x4a45af
lea eax, [esp + 0x10]
mov dword [esp + 4], eax
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0x80
mov eax, dword [0x515ec8]
movdqu xmm0, xmmword [eax]
movdqu xmmword [esp + 0x90], xmm0
mov dword [esp], 0
mov eax, esp
lea ecx, [esp + 0x90]
push eax
push 0
push 0x8000
push ecx
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
jne 0x4a3f46
mov edi, dword [esp]
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
add esp, 4
lea esi, [esp + 4]
mov ecx, 0xfde9
mov edx, edi
push esi
push eax
call fcn.004ab0c0
add esp, 8
mov edi, eax
push dword [esp]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test edi, edi
jne 0x4a3f46
push 0
push esi
call fcn.004a3e30
add esp, 8
mov ebp, dword [ebx]
mov esi, dword [ebx + 4]
mov edi, dword [esp + 8]
lea eax, [edi + esi]
dec eax
cmp dword [esp + 0xc], eax
jae 0x4a3f6e
lea ecx, [esp + 4]
push 1
push eax
lea eax, [esp + 0x18]
push eax
call fcn.0046e2c0
mov edi, dword [esp + 8]
lea ebx, [esi - 1]
cmp esi, 1
je 0x4a3f8a
inc ebp
add edi, dword [esp + 4]
push ebx
push ebp
push edi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov edi, dword [esp + 8]
add edi, ebx
mov dword [esp + 8], edi
lea eax, [esp + 4]
mov esi, dword [esp + 0xb4]
cmp eax, esi
je 0x4a459a
mov ebp, dword [esi + 4]
cmp ebp, edi
jae 0x4a454f
cmp dword [esi + 8], edi
jae 0x4a4561
mov dword [esi + 4], 0
lea eax, [esi + 0xc]
mov ecx, esi
push 1
push edi
push eax
call fcn.0046e2c0
jmp 0x4a4576
mov byte [ecx], bl
inc ecx
dec edi
je 0x4a3e8c
movzx esi, byte [ecx]
cmp esi, 0x5c
je 0x4a3fe0
cmp esi, 0x2f
je 0x4a3fe0
jmp 0x4a3fe2
mov byte [ecx + 3], bl
add ecx, 4
cmp ecx, eax
je 0x4a3e95
movzx edx, byte [ecx]
cmp edx, 0x5c
je 0x4a401b
cmp edx, 0x2f
jne 0x4a401d
mov byte [ecx], bl
movzx edx, byte [ecx + 1]
cmp edx, 0x5c
je 0x4a402b
cmp edx, 0x2f
jne 0x4a402e
mov byte [ecx + 1], bl
movzx edx, byte [ecx + 2]
cmp edx, 0x5c
je 0x4a403c
cmp edx, 0x2f
jne 0x4a403f
mov byte [ecx + 2], bl
movzx edx, byte [ecx + 3]
cmp edx, 0x5c
je 0x4a4000
cmp edx, 0x2f
je 0x4a4000
jmp 0x4a4003
xor esi, esi
cmp edx, 0x20
jb 0x4a4439
mov esi, edx
and esi, 0xffffffe0
xor edi, edi
movdqa xmm0, xmmword [0x515b40]
jmp 0x4a407b
add edi, 0x20
cmp esi, edi
je 0x4a4428
movdqu xmm2, xmmword [ecx + edi]
pcmpeqb xmm2, xmm0
movd edx, xmm2
test dl, 1
je 0x4a4260
mov byte [ecx + edi], 0x2f
test dh, 1
jne 0x4a4269
mov ebx, edx
shr ebx, 0x10
test bl, 1
je 0x4a427c
mov byte [ecx + edi + 2], 0x2f
shr edx, 0x18
test dl, 1
jne 0x4a4288
pextrw ebx, xmm2, 2
test bl, 1
je 0x4a429b
mov byte [ecx + edi + 4], 0x2f
test bh, 1
jne 0x4a42a4
pextrw ebx, xmm2, 3
test bl, 1
je 0x4a42b7
mov byte [ecx + edi + 6], 0x2f
test bh, 1
jne 0x4a42c0
pextrw ebx, xmm2, 4
test bl, 1
je 0x4a42d3
mov byte [ecx + edi + 8], 0x2f
test bh, 1
jne 0x4a42dc
movdqu xmm1, xmmword [ecx + edi + 0x10]
pextrw ebx, xmm2, 5
test bl, 1
je 0x4a42f5
mov byte [ecx + edi + 0xa], 0x2f
test bh, 1
jne 0x4a42fe
pextrw ebx, xmm2, 6
test bl, 1
je 0x4a4311
mov byte [ecx + edi + 0xc], 0x2f
test bh, 1
jne 0x4a431a
pextrw ebx, xmm2, 7
test bl, 1
je 0x4a432d
mov byte [ecx + edi + 0xe], 0x2f
test bh, 1
jne 0x4a4336
pcmpeqb xmm1, xmm0
movd ebx, xmm1
test bl, 1
je 0x4a434c
mov byte [ecx + edi + 0x10], 0x2f
test bh, 1
jne 0x4a4355
mov edx, ebx
shr edx, 0x10
test dl, 1
je 0x4a4368
mov byte [ecx + edi + 0x12], 0x2f
shr ebx, 0x18
test bl, 1
mov edx, ebp
jne 0x4a4376
pextrw ebx, xmm1, 2
test bl, 1
je 0x4a4389
mov byte [ecx + edi + 0x14], 0x2f
test bh, 1
jne 0x4a4392
pextrw ebx, xmm1, 3
test bl, 1
je 0x4a43a5
mov byte [ecx + edi + 0x16], 0x2f
test bh, 1
jne 0x4a43ae
pextrw ebx, xmm1, 4
test bl, 1
je 0x4a43c1
mov byte [ecx + edi + 0x18], 0x2f
test bh, 1
jne 0x4a43ca
pextrw ebx, xmm1, 5
test bl, 1
je 0x4a43dd
mov byte [ecx + edi + 0x1a], 0x2f
test bh, 1
jne 0x4a43e6
pextrw ebx, xmm1, 6
test bl, 1
je 0x4a43f9
mov byte [ecx + edi + 0x1c], 0x2f
test bh, 1
jne 0x4a4402
pextrw ebx, xmm1, 7
test bl, 1
je 0x4a4415
mov byte [ecx + edi + 0x1e], 0x2f
test bh, 1
je 0x4a4070
jmp 0x4a441e
test dh, 1
je 0x4a409e
mov byte [ecx + edi + 1], 0x2f
mov ebx, edx
shr ebx, 0x10
test bl, 1
jne 0x4a40ac
shr edx, 0x18
test dl, 1
je 0x4a40bd
mov byte [ecx + edi + 3], 0x2f
pextrw ebx, xmm2, 2
test bl, 1
jne 0x4a40cb
test bh, 1
je 0x4a40d9
mov byte [ecx + edi + 5], 0x2f
pextrw ebx, xmm2, 3
test bl, 1
jne 0x4a40e7
test bh, 1
je 0x4a40f5
mov byte [ecx + edi + 7], 0x2f
pextrw ebx, xmm2, 4
test bl, 1
jne 0x4a4103
test bh, 1
je 0x4a4111
mov byte [ecx + edi + 9], 0x2f
movdqu xmm1, xmmword [ecx + edi + 0x10]
pextrw ebx, xmm2, 5
test bl, 1
jne 0x4a4125
test bh, 1
je 0x4a4133
mov byte [ecx + edi + 0xb], 0x2f
pextrw ebx, xmm2, 6
test bl, 1
jne 0x4a4141
test bh, 1
je 0x4a414f
mov byte [ecx + edi + 0xd], 0x2f
pextrw ebx, xmm2, 7
test bl, 1
jne 0x4a415d
test bh, 1
je 0x4a416b
mov byte [ecx + edi + 0xf], 0x2f
pcmpeqb xmm1, xmm0
movd ebx, xmm1
test bl, 1
jne 0x4a417c
test bh, 1
je 0x4a418a
mov byte [ecx + edi + 0x11], 0x2f
mov edx, ebx
shr edx, 0x10
test dl, 1
jne 0x4a4198
shr ebx, 0x18
test bl, 1
mov edx, ebp
je 0x4a41ab
mov byte [ecx + edi + 0x13], 0x2f
pextrw ebx, xmm1, 2
test bl, 1
jne 0x4a41b9
test bh, 1
je 0x4a41c7
mov byte [ecx + edi + 0x15], 0x2f
pextrw ebx, xmm1, 3
test bl, 1
jne 0x4a41d5
test bh, 1
je 0x4a41e3
mov byte [ecx + edi + 0x17], 0x2f
pextrw ebx, xmm1, 4
test bl, 1
jne 0x4a41f1
test bh, 1
je 0x4a41ff
mov byte [ecx + edi + 0x19], 0x2f
pextrw ebx, xmm1, 5
test bl, 1
jne 0x4a420d
test bh, 1
je 0x4a421b
mov byte [ecx + edi + 0x1b], 0x2f
pextrw ebx, xmm1, 6
test bl, 1
jne 0x4a4229
test bh, 1
je 0x4a4237
mov byte [ecx + edi + 0x1d], 0x2f
pextrw ebx, xmm1, 7
test bl, 1
jne 0x4a4245
test bh, 1
je 0x4a4070
mov byte [ecx + edi + 0x1f], 0x2f
jmp 0x4a4070
cmp edx, esi
je 0x4a45af
test dl, 0x18
je 0x4a45ba
mov ebx, edx
and ebx, 0xfffffff8
lea edi, [ecx + ebx]
movdqa xmm0, xmmword [0x515b50]
movdqa xmm1, xmmword [0x515b40]
jmp 0x4a446b
add esi, 8
cmp ebx, esi
je 0x4a4549
movq xmm2, qword [ecx + esi]
movdqa xmm3, xmm2
pcmpeqb xmm3, xmm0
movd edx, xmm3
test dl, 1
je 0x4a4485
mov byte [ecx + esi], 0x2f
punpcklbw xmm2, xmm2
pcmpeqb xmm2, xmm1
movd edx, xmm2
shr edx, 0x10
test dl, 1
je 0x4a44f0
mov byte [ecx + esi + 1], 0x2f
pextrw edx, xmm2, 2
test dl, 1
jne 0x4a44fa
pextrw edx, xmm2, 3
test dl, 1
je 0x4a4509
mov byte [ecx + esi + 3], 0x2f
pextrw edx, xmm2, 4
test dl, 1
jne 0x4a4513
pextrw edx, xmm2, 5
test dl, 1
je 0x4a4522
mov byte [ecx + esi + 5], 0x2f
pextrw edx, xmm2, 6
test dl, 1
jne 0x4a452c
pextrw edx, xmm2, 7
test dl, 1
je 0x4a4460
jmp 0x4a453f
pextrw edx, xmm2, 2
test dl, 1
je 0x4a44a8
mov byte [ecx + esi + 2], 0x2f
pextrw edx, xmm2, 3
test dl, 1
jne 0x4a44b2
pextrw edx, xmm2, 4
test dl, 1
je 0x4a44c1
mov byte [ecx + esi + 4], 0x2f
pextrw edx, xmm2, 5
test dl, 1
jne 0x4a44cb
pextrw edx, xmm2, 6
test dl, 1
je 0x4a44da
mov byte [ecx + esi + 6], 0x2f
pextrw edx, xmm2, 7
test dl, 1
je 0x4a4460
mov byte [ecx + esi + 7], 0x2f
jmp 0x4a4460
cmp ebp, ebx
jne 0x4a45c5
jmp 0x4a45af
test edi, edi
je 0x4a4597
push edi
push dword [esp + 8]
push dword [esi]
call sub.api_ms_win_crt_private_l1_1_0.dll_memmove
jmp 0x4a4594
test ebp, ebp
je 0x4a4576
push ebp
push dword [esp + 8]
push dword [esi]
call sub.api_ms_win_crt_private_l1_1_0.dll_memmove
add esp, 0xc
jmp 0x4a4578
xor ebp, ebp
mov eax, dword [esp + 8]
cmp ebp, eax
je 0x4a4597
mov ecx, dword [esp + 4]
add eax, ecx
add ecx, ebp
add ebp, dword [esi]
sub eax, ecx
push eax
push ecx
push ebp
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov dword [esi + 4], edi
mov eax, dword [esp + 4]
lea ecx, [esp + 0x10]
cmp eax, ecx
je 0x4a45af
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
add esp, 0xa0
pop esi
pop edi
pop ebx
pop ebp
ret
add ecx, esi
mov edi, ecx
jmp 0x4a45c5
inc edi
cmp edi, eax
je 0x4a45af
cmp byte [edi], 0x5c
jne 0x4a45c0
mov byte [edi], 0x2f
jmp 0x4a45c0