Function at 0x408218
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x30], eax
test esi, esi
jns 0x40823a
inc esi
imul esi, esi, 0xfffffffc
add esi, dword [0x7ac6c0]
mov esi, dword [esi]
add esi, dword [0x419558]
mov ebx, 0x7ae7a0
cmp dword [ebp - 0x30], ebx
jb 0x40825e
mov eax, dword [ebp - 0x30]
sub eax, ebx
cmp eax, 0x7ff
ja 0x40825e
xor eax, eax
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x30], eax
mov dl, byte [esi]
test dl, dl
je 0x4084e9
mov eax, ebx
sub eax, 0x7ae7a0
cmp eax, 0x3ff
jg 0x4084e9
cmp dl, 3
ja 0x4084cd
movsx eax, byte [esi + 2]
add esi, 3
mov dword [ebp - 0x2c], eax
mov al, byte [esi - 2]
mov edi, dword [ebp - 0x2c]
mov ecx, eax
shl edi, 7
and ecx, 0x7f
and edi, 0x3f80
or edi, ecx
movsx ecx, al
mov dword [ebp - 0x34], ecx
or ch, 0x80
mov dword [ebp - 0x28], ecx
movsx ecx, al
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x2c]
or ch, 0x80
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], ecx
cmp dl, 2
jne 0x408467
cmp byte [0x41805c], 0
mov dword [ebp - 0x38], 1
jne 0x4082fc
cmp word [0x41805e], 0x459
ja 0x4082fc
cmp ecx, 0x23
sete dl
cmp ecx, 0x2e
sete cl
or edx, ecx
movzx ecx, dl
mov dword [ebp - 0x38], ecx
cmp dword [0x418024], 1
sbb edi, edi
and edi, 0xfffffffe
add edi, 4
test al, al
jns 0x408356
mov edx, eax
mov dword [esp + 0xc], ebx
and eax, 0x3f
and edx, 0x40
mov dword [esp + 0x10], edx
add eax, dword [0x419558]
mov dword [esp + 8], eax
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersion
mov dword [esp], 0x80000002
call fcn.00407cb9
sub esp, 0x14
cmp byte [ebx], 0
jne 0x408388
mov eax, dword [ebp - 0x2c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00408218
jmp 0x408386
cmp dword [ebp - 0x34], 0x25
jne 0x40836f
mov dword [esp], ebx
mov dword [esp + 4], 0x400
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x408386
cmp dword [ebp - 0x34], 0x24
jne 0x4083da
mov dword [esp + 4], 0x400
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push edi
push edi
xor edi, edi
jmp 0x4083da
mov eax, dword [ebp + edi*4 - 0x28]
mov dword [ebp - 0x34], eax
and eax, 0x8000
mov dword [ebp - 0x3c], eax
mov eax, dword [0x7abe84]
test eax, eax
jne 0x4083e1
mov dword [esp], 7
call fcn.004081a6
push ecx
mov ecx, dword [ebp - 0x3c]
mov dword [esp + 8], ecx
mov edx, dword [ebp - 0x34]
and edx, 0xbf
mov dword [esp + 4], edx
mov edx, dword [0x7abe8c]
mov dword [esp], edx
call eax
sub esp, 0xc
test eax, eax
jne 0x408438
mov byte [ebx], 0
sub edi, 1
jae 0x40838c
jmp 0x408411
cmp dword [ebp - 0x38], 0
je 0x4083a4
xor edx, edx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], edx
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x34]
and edx, 0xffffffbf
mov dword [esp + 4], edx
mov edx, dword [0x7abe8c]
mov dword [esp], edx
call eax
sub esp, 0x14
test eax, eax
jne 0x4083a4
cmp byte [ebx], 0
je 0x4084a4
cmp dword [ebp - 0x2c], 0x1a
jne 0x4084a4
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatA
push eax
push eax
jmp 0x4084a4
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [ebp - 0x3c], eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push edx
push edx
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x34], eax
mov dword [esp], edx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push ecx
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x4083d7
jmp 0x408411
cmp dl, 3
jne 0x4084af
cmp edi, 0x1d
jne 0x408484
mov eax, dword [0x7abe8c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00407d5f
jmp 0x4084bd
mov eax, edi
mov dword [esp], ebx
sub edi, 0x15
shl eax, 0xa
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.00407e43
push eax
push eax
cmp edi, 6
ja 0x4084bf
mov dword [esp], ebx
call fcn.00407f68
push edi
jmp 0x4084bf
not edi
mov dword [esp], ebx
mov dword [esp + 4], edi
call fcn.00408218
push ecx
push ecx
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, ebx
push edx
jmp 0x4084e2
lea eax, [ebx + 1]
cmp dl, 4
jne 0x4084df
mov dl, byte [esi + 1]
add esi, 2
mov byte [ebx], dl
jmp 0x4084e2
mov byte [ebx], dl
inc esi
mov ebx, eax
jmp 0x40825e
cmp dword [ebp - 0x30], 0
mov byte [ebx], 0
je 0x40850b
mov eax, dword [ebp - 0x30]
mov dword [ebp + 0xc], 0x7ae7a0
mov dword [ebp + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00407e43
lea esp, [ebp - 0xc]
mov eax, 0x7ae7a0
pop ebx
pop esi
pop edi
pop ebp
ret 8