Function at 0x40a4df
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 dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
test eax, eax
jns 0x40a501
inc eax
imul eax, eax, 0xfffffffc
add eax, dword [0x4352a0]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00409e36
push edx
test eax, eax
mov dword [ebp - 0x30], eax
je 0x40a7e0
mov ebx, 0x4463a0
cmp dword [ebp - 0x2c], ebx
jb 0x40a533
mov eax, dword [ebp - 0x2c]
sub eax, ebx
cmp eax, 0x3ffe
ja 0x40a533
xor eax, eax
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
mov edi, dword [ebp - 0x30]
movzx eax, word [edi]
test eax, eax
je 0x40a7a9
mov edx, ebx
sub edx, 0x4463a0
cmp edx, 0x1ffe
jg 0x40a7a9
cmp eax, 3
ja 0x40a788
movzx ecx, word [edi + 2]
add edi, 4
movsx esi, byte [edi - 1]
movzx edx, byte [edi - 2]
mov dword [ebp - 0x38], ecx
movzx ecx, byte [ebp - 0x38]
shl esi, 7
and edx, 0x7f
and esi, 0x3f80
or esi, edx
mov byte [ebp - 0x3c], cl
mov edx, ecx
mov dword [ebp - 0x24], ecx
or dh, 0x80
mov dword [ebp - 0x28], edx
mov edx, dword [ebp - 0x38]
shr edx, 8
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x1c], edx
or dh, 0x80
cmp eax, 2
mov dword [ebp - 0x20], edx
jne 0x40a721
cmp dword [0x413024], 1
sbb esi, esi
and esi, 0xfffffffe
add esi, 4
cmp byte [ebp - 0x38], 0
jns 0x40a61e
mov al, byte [ebp - 0x3c]
and al, 0x3f
movzx eax, al
mov dword [esp], eax
call fcn.00409e36
push esi
mov esi, eax
mov al, byte [ebp - 0x3c]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersion
mov dword [esp], 0x80000002
and al, 0x40
movzx eax, al
mov dword [esp + 0x10], eax
call fcn.00409c00
sub esp, 0x14
mov dword [esp], esi
call fcn.00409ea3
push eax
cmp word [ebx], 0
jne 0x40a64e
mov eax, dword [ebp - 0x34]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0040a4df
jmp 0x40a64c
cmp ecx, 0x25
jne 0x40a636
mov dword [esp], ebx
mov dword [esp + 4], 0x1000
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x40a64c
cmp ecx, 0x24
jne 0x40a6a7
mov dword [esp + 4], 0x1000
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push ecx
push ecx
xor esi, esi
jmp 0x40a6a7
mov eax, dword [ebp + esi*4 - 0x28]
mov dword [ebp - 0x38], eax
mov edx, eax
and eax, 0x8000
mov dword [ebp - 0x3c], eax
mov eax, dword [0x431264]
and edx, 0xffffffbf
test eax, eax
jne 0x40a6ae
mov dword [esp], 7
call fcn.0040a46c
push edx
mov ecx, dword [ebp - 0x3c]
mov dword [esp + 8], ecx
mov edx, dword [ebp - 0x38]
and edx, 0xbf
mov dword [esp + 4], edx
mov edx, dword [0x43126c]
mov dword [esp], edx
call eax
sub esp, 0xc
test eax, eax
jne 0x40a6f6
mov word [ebx], 0
sub esi, 1
jae 0x40a652
jmp 0x40a6d2
mov dword [esp + 0x10], ebx
xor ecx, ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov edx, dword [0x43126c]
mov dword [esp], edx
call eax
sub esp, 0x14
test eax, eax
jne 0x40a66f
cmp word [ebx], 0
je 0x40a75e
cmp dword [ebp - 0x34], 0x1a
jne 0x40a75e
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
push eax
push eax
jmp 0x40a75e
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [ebp - 0x3c], eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push edx
push edx
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x38], eax
mov dword [esp], edx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push ecx
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x40a6a2
jmp 0x40a6d2
cmp eax, 3
jne 0x40a769
cmp esi, 0x1d
jne 0x40a73e
mov eax, dword [0x43126c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00409caa
jmp 0x40a777
mov dword [esp], ebx
mov eax, esi
sub esi, 0x15
shl eax, 0xd
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.00409d7a
cmp esi, 6
push eax
push eax
ja 0x40a779
mov dword [esp], ebx
call fcn.00409eb9
push esi
jmp 0x40a779
mov dword [esp], ebx
not esi
mov dword [esp + 4], esi
call fcn.0040a4df
push ecx
push ecx
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push edx
lea edx, [ebx + eax*2]
jmp 0x40a7a2
lea edx, [ebx + 2]
cmp eax, 4
jne 0x40a79c
movzx eax, word [edi + 2]
add edi, 4
mov word [ebx], ax
jmp 0x40a7a2
mov word [ebx], ax
add edi, 2
mov ebx, edx
jmp 0x40a536
mov word [ebx], 0
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call fcn.00409ea3
push eax
cmp dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0x4463a0
je 0x40a7e0
mov dword [ebp + 0xc], 0x4463a0
mov eax, dword [ebp - 0x2c]
mov dword [ebp + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00409d7a
mov eax, dword [ebp - 0x30]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8