Function at 0x4872b0
Capabilities:
Get common file path

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov ebx, ecx
lea eax, [esp + 0x10]
push eax
push 0
push 0
push edx
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
js 0x487531
mov ebp, dword [esp + 0x10]
test ebp, ebp
mov dword [esp + 8], ebx
je 0x487362
push ebp
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
add esp, 4
test eax, eax
je 0x487362
sub esp, 0x20
xorps xmm0, xmm0
movups xmmword [esp + 0x10], xmm0
mov dword [esp + 0x20], eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebp
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
mov ebx, eax
mov esi, eax
inc esi
mov dword [esp + 4], eax
jne 0x4873bf
mov esi, dword [0x5052b0]
push 0
push 0
push ebx
push esi
push dword [esp + 0x10]
push ebp
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov byte [esi + ebx], 0
mov esi, 0x20
push 0x20
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov ebp, eax
jmp 0x4873f6
mov al, 1
mov dword [esp + 0xc], eax
xor edi, edi
mov ebp, dword [0x5052b0]
mov al, 1
mov esi, 0x20
lea ecx, [edi + 2]
mov edx, esi
nop dword [eax]
mov esi, edx
add edx, edx
cmp ecx, esi
ja 0x487380
test al, al
je 0x4873ae
mov dword [esp], ebp
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov ebp, eax
cmp byte [esp + 0xc], 0
je 0x48742a
mov byte [ebp], 0
jmp 0x48743b
push esi
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
mov ebp, eax
jmp 0x48743b
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov byte [eax], 0
push 0
push 0
push ebx
push eax
push dword [esp + 0x10]
push ebp
mov ebp, eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov byte [ebp + ebx], 0
test edi, edi
mov eax, edi
je 0x48753f
mov edi, eax
mov ebx, dword [esp + 8]
push 0x5c
push ebp
nop dword [eax]
call sub.api_ms_win_crt_private_l1_1_0.dll_strchr
add esp, 8
test eax, eax
je 0x487415
mov byte [eax], 0x2f
inc eax
push 0x5c
push eax
jmp 0x487400
mov eax, dword [esp + 4]
cmp byte [eax + ebp - 1], 0x2f
jne 0x487539
mov eax, dword [esp + 4]
jmp 0x487448
lea eax, [edi + 1]
push eax
push dword [esp + 4]
push ebp
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
lea eax, [edi + 1]
mov byte [ebp + edi], 0x2f
mov byte [ebp + eax], 0
mov ecx, dword [ebx + 8]
test ecx, ecx
mov dword [esp + 4], eax
je 0x4874b4
mov dword [esp], ebp
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], eax
lea ebp, [eax + 8]
xor edi, edi
nop dword [eax + eax]
mov ebx, ecx
mov eax, dword [ebp - 4]
mov ecx, dword [esp + 4]
cmp eax, ecx
cmovae eax, ecx
inc eax
push eax
push dword [esp + 4]
push dword [ebp]
call sub.api_ms_win_crt_private_l1_1_0.dll_memcmp
add esp, 0xc
test eax, eax
je 0x48750d
inc edi
add ebp, dword [esp + 0xc]
mov ecx, ebx
cmp ebx, edi
jne 0x487470
mov ebx, dword [esp + 8]
mov edi, dword [esp + 4]
mov ebp, dword [esp]
mov eax, dword [esp + 0x14]
cmp ecx, dword [ebx + 0xc]
je 0x4874c9
jmp 0x4874ec
mov edx, ebx
xor edi, edi
cmp edi, ecx
jne 0x48751a
mov ebx, edx
mov eax, dword [edx]
mov edi, dword [esp + 4]
cmp ecx, dword [ebx + 0xc]
jne 0x4874ec
lea edx, [ecx + ecx]
test ecx, ecx
mov ecx, 0x10
cmovne ecx, edx
mov dword [ebx + 0xc], ecx
imul ecx, dword [ebx + 4]
push ecx
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
mov dword [ebx], eax
mov ecx, dword [ebx + 8]
lea edx, [ecx + 1]
mov dword [ebx + 8], edx
imul ecx, dword [ebx + 4]
mov dword [eax + ecx], esi
mov dword [eax + ecx + 8], ebp
mov dword [eax + ecx + 4], edi
push dword [esp + 0x10]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x487531
mov edx, dword [esp + 8]
mov ebp, dword [esp]
mov ecx, ebx
cmp edi, ecx
je 0x4874bc
push dword [esp + 0x10]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
je 0x487531
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
xor ecx, ecx
mov eax, edi
jmp 0x48754a
mov esi, 1
mov cl, 1
mov ebx, dword [esp + 8]
inc eax
cmp esi, eax
mov edi, dword [esp + 4]
jne 0x48743e
mov dword [esp + 0xc], ecx
xor eax, eax
cmp esi, 1
jbe 0x487372
jmp 0x487377