Function at 0x408259
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 - 0x40], eax
test esi, esi
jns 0x40827b
inc esi
imul esi, esi, 0xfffffffc
add esi, dword [0x432da0]
mov esi, dword [esi]
add esi, dword [0x414538]
mov ebx, 0x434e80
cmp dword [ebp - 0x40], ebx
jb 0x4082d6
mov eax, dword [ebp - 0x40]
sub eax, ebx
cmp eax, 0x7ff
ja 0x4082d6
mov ebx, dword [ebp - 0x40]
mov dword [ebp - 0x40], 0
jmp 0x4082d6
mov eax, edi
mov dword [esp], ebx
sub edi, 0x15
shl eax, 0xa
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.0040805f
push eax
push eax
cmp edi, 6
jbe 0x4084df
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push edx
lea edx, [ebx + eax]
mov ebx, edx
mov al, byte [esi]
test al, al
je 0x408526
mov edx, ebx
sub edx, 0x434e80
cmp edx, 0x3ff
jg 0x408526
cmp al, 3
ja 0x40850a
movsx ecx, byte [esi + 2]
add esi, 3
mov dword [ebp - 0x3c], ecx
mov edi, dword [ebp - 0x3c]
movsx ecx, byte [esi - 2]
shl edi, 7
mov edx, ecx
mov dword [ebp - 0x44], ecx
and edi, 0x3f80
and ecx, 0x7f
or edi, ecx
movsx ecx, dl
or ch, 0x80
mov dword [ebp - 0x28], ecx
movsx ecx, dl
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x3c]
or ch, 0x80
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x1c], ecx
cmp al, 2
jne 0x4084bf
mov eax, dword [0x432160]
mov dword [ebp - 0x48], 1
test eax, eax
jns 0x408370
cmp ax, 0x5a04
je 0x408370
cmp ecx, 0x23
sete al
cmp ecx, 0x2e
sete cl
or eax, ecx
movzx eax, al
mov dword [ebp - 0x48], eax
cmp dword [0x413064], 1
sbb edi, edi
and edi, 0xfffffffe
add edi, 4
test dl, dl
jns 0x4083ce
mov eax, edx
and edx, 0x3f
mov dword [esp + 0xc], ebx
xor edi, edi
and eax, 0x40
add edx, dword [0x414538]
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersion
mov dword [esp + 0x10], eax
mov dword [esp + 8], edx
mov dword [esp], 0x80000002
call fcn.00407ecf
sub esp, 0x14
cmp byte [ebx], 0
jne 0x408434
mov eax, dword [ebp - 0x3c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00408259
push eax
push eax
jmp 0x408434
cmp dword [ebp - 0x44], 0x25
jne 0x4083e7
mov dword [esp], ebx
mov dword [esp + 4], 0x400
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x4083fe
cmp dword [ebp - 0x44], 0x24
jne 0x408434
mov dword [esp + 4], 0x400
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push edi
push edi
xor edi, edi
jmp 0x408434
mov eax, dword [0x432164]
mov edx, dword [ebp + edi*4 - 0x28]
test eax, eax
jne 0x40843b
lea eax, [ebp - 0x2c]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov eax, dword [0x43216c]
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
sub esp, 0xc
test eax, eax
je 0x408490
mov byte [ebx], 0
sub edi, 1
jae 0x408404
jmp 0x408471
cmp dword [ebp - 0x48], 0
je 0x408411
mov ecx, dword [0x43216c]
mov dword [esp + 4], edx
mov dword [ebp - 0x44], edx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x44]
sub esp, 0x14
test eax, eax
jne 0x408411
cmp byte [ebx], 0
je 0x4084df
cmp dword [ebp - 0x3c], 0x1a
jne 0x4084df
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatA
push eax
push eax
jmp 0x4084df
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push edx
push edx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x44], eax
mov dword [esp], edx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x44]
push ecx
test eax, eax
je 0x408431
jmp 0x408471
cmp al, 3
jne 0x4084ed
cmp edi, 0x1d
jne 0x4082a3
mov eax, dword [0x43216c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00407f77
jmp 0x408503
mov dword [esp], ebx
call fcn.00408190
push edi
jmp 0x4082c7
dec al
jne 0x4082c7
not edi
mov dword [esp], ebx
mov dword [esp + 4], edi
call fcn.00408259
push ecx
push ecx
jmp 0x4082c7
lea edx, [ebx + 1]
cmp al, 4
jne 0x40851e
mov al, byte [esi + 1]
add esi, 2
mov byte [ebx], al
jmp 0x4082d4
mov byte [ebx], al
inc esi
jmp 0x4082d4
cmp dword [ebp - 0x40], 0
mov byte [ebx], 0
je 0x408548
mov eax, dword [ebp - 0x40]
mov dword [ebp + 0xc], 0x434e80
mov dword [ebp + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.0040805f
lea esp, [ebp - 0xc]
mov eax, 0x434e80
pop ebx
pop esi
pop edi
pop ebp
ret 8