Function at 0x4024d0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24c
mov eax, dword [0x4545c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push ebx
mov edi, ecx
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
js 0x4027f5
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov dword [ebp - 0x238], eax
lea eax, [ebp - 0x220]
push eax
push 0x4395b0
push 0x17
push ebx
push 0x4395c0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x4027ef
mov ecx, 3
mov word [ebp - 0x24c], cx
mov dword [ebp - 0x218], ebx
lea ebx, [ebx]
mov esi, dword [ebp - 0x24c]
mov ecx, dword [ebp - 0x220]
mov edx, dword [ecx]
lea eax, [ebp - 0x234]
push eax
sub esp, 0x10
mov eax, esp
mov dword [eax], esi
mov esi, dword [ebp - 0x248]
mov dword [eax + 4], esi
mov esi, dword [ebp - 0x240]
push ecx
mov ecx, dword [edx + 0x20]
mov dword [eax + 8], ebx
mov dword [eax + 0xc], esi
call ecx
test eax, eax
jne 0x4027e1
mov eax, dword [ebp - 0x234]
mov edx, dword [eax]
mov edx, dword [edx]
lea ecx, [ebp - 0x210]
push ecx
push 0x4395a0
push eax
call edx
test eax, eax
js 0x4027c5
mov eax, dword [ebp - 0x210]
mov ecx, dword [eax]
lea edx, [ebp - 0x23c]
push edx
push eax
mov eax, dword [ecx + 0x94]
call eax
test eax, eax
js 0x4027b7
mov ecx, dword [ebp - 0x238]
cmp dword [ebp - 0x23c], ecx
jne 0x4027b7
mov eax, dword [ebp - 0x210]
mov edx, dword [eax]
mov edx, dword [edx]
lea ecx, [ebp - 0x214]
push ecx
push 0x439570
push eax
mov dword [ebp - 0x218], 1
call edx
test eax, eax
js 0x4027b7
mov eax, dword [ebp - 0x214]
mov ecx, dword [eax]
lea edx, [ebp - 0x224]
push edx
push 0x439550
push 0x439560
push eax
mov eax, dword [ecx + 0xc]
call eax
test eax, eax
js 0x4027a9
mov eax, dword [ebp - 0x224]
mov ecx, dword [eax]
lea edx, [ebp - 0x228]
push edx
push eax
mov eax, dword [ecx + 0x3c]
call eax
test eax, eax
js 0x40279b
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax]
lea edx, [ebp - 0x21c]
push edx
push 0x439590
push eax
mov eax, dword [ecx]
call eax
test eax, eax
js 0x40278d
mov eax, dword [ebp - 0x21c]
mov ecx, dword [eax]
lea edx, [ebp - 0x230]
push edx
push 0x439580
push eax
mov eax, dword [ecx + 0x14]
call eax
test eax, eax
js 0x40277f
mov eax, dword [ebp - 0x230]
mov ecx, dword [eax]
lea edx, [ebp - 0x22c]
push edx
push eax
mov eax, dword [ecx + 0x14]
call eax
test eax, eax
js 0x402771
mov ecx, dword [ebp - 0x22c]
push edi
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
cmp word [edi], 0
jne 0x402764
push 0x26
lea esi, [edi + 4]
push 0x44c3c0
push esi
call fcn.00424694
add esp, 0xc
test eax, eax
jne 0x402764
push 1
push 0x44c3bc
add esi, 0x4c
push esi
call fcn.00424694
add esp, 0xc
test eax, eax
jne 0x402764
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x20a]
push eax
mov word [ebp - 0x20c], dx
call fcn.0042c9e0
lea eax, [edi + 0x50]
lea edx, [ebp - 0x20c]
add esp, 0xc
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x402714
mov eax, str.C:UsersPublic_
mov edx, edi
sub edx, eax
lea esp, [esp]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x402730
lea ecx, [ebp - 0x20c]
push 0x2e
push ecx
call fcn.0042443c
lea edx, [ebp - 0x20c]
sub eax, edx
sar eax, 1
push eax
mov eax, edx
push eax
push edi
call fcn.00424620
add esp, 0x14
mov ecx, dword [ebp - 0x22c]
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x230]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov eax, dword [ebp - 0x21c]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [ebp - 0x224]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [ebp - 0x214]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [ebp - 0x210]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [ebp - 0x234]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
inc ebx
cmp dword [ebp - 0x218], 0
je 0x402540
mov eax, dword [ebp - 0x220]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
call dword [sym.imp.ole32.dll_CoUninitialize]
cmp word [edi], 0
je 0x4028c2
cmp word [edi + 2], 0x3a
jne 0x4028c2
push 0x26
push str.C:Documents_and_SettingsLocalService
push edi
call fcn.00424694
add esp, 0xc
test eax, eax
jne 0x4028cf
push 0x206
push eax
lea ecx, [ebp - 0x20a]
push ecx
mov word [ebp - 0x20c], ax
call fcn.0042c9e0
lea edx, [ebp - 0x20c]
add esp, 0xc
mov eax, edi
sub edx, edi
jmp 0x402850
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x402850
push 0
push 0
push edi
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x5c
push edi
call fcn.0042443c
add esp, 8
xor edx, edx
mov word [eax + 2], dx
lea eax, [ebp - 0x1be]
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402885
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x402895
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004243bb
mov esp, ebp
pop ebp
ret
push 0
push 0
push edi
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004243bb
mov esp, ebp
pop ebp
ret