Function at 0x40a4b7
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 0x40a4d9
inc eax
imul eax, eax, 0xfffffffc
add eax, dword [0x435280]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00409e0e
push edx
test eax, eax
mov dword [ebp - 0x30], eax
je 0x40a7b8
mov ebx, 0x446380
cmp dword [ebp - 0x2c], ebx
jb 0x40a50b
mov eax, dword [ebp - 0x2c]
sub eax, ebx
cmp eax, 0x3ffe
ja 0x40a50b
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 0x40a781
mov edx, ebx
sub edx, 0x446380
cmp edx, 0x1ffe
jg 0x40a781
cmp eax, 3
ja 0x40a760
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 0x40a6f9
cmp dword [0x413024], 1
sbb esi, esi
and esi, 0xfffffffe
add esi, 4
cmp byte [ebp - 0x38], 0
jns 0x40a5f6
mov al, byte [ebp - 0x3c]
and al, 0x3f
movzx eax, al
mov dword [esp], eax
call fcn.00409e0e
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.00409bd8
sub esp, 0x14
mov dword [esp], esi
call fcn.00409e7b
push eax
cmp word [ebx], 0
jne 0x40a626
mov eax, dword [ebp - 0x34]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0040a4b7
jmp 0x40a624
cmp ecx, 0x25
jne 0x40a60e
mov dword [esp], ebx
mov dword [esp + 4], 0x1000
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x40a624
cmp ecx, 0x24
jne 0x40a67f
mov dword [esp + 4], 0x1000
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push ecx
push ecx
xor esi, esi
jmp 0x40a67f
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 [0x431244]
and edx, 0xffffffbf
test eax, eax
jne 0x40a686
mov dword [esp], 7
call fcn.0040a444
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 [0x43124c]
mov dword [esp], edx
call eax
sub esp, 0xc
test eax, eax
jne 0x40a6ce
mov word [ebx], 0
sub esi, 1
jae 0x40a62a
jmp 0x40a6aa
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 [0x43124c]
mov dword [esp], edx
call eax
sub esp, 0x14
test eax, eax
jne 0x40a647
cmp word [ebx], 0
je 0x40a736
cmp dword [ebp - 0x34], 0x1a
jne 0x40a736
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
push eax
push eax
jmp 0x40a736
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 0x40a67a
jmp 0x40a6aa
cmp eax, 3
jne 0x40a741
cmp esi, 0x1d
jne 0x40a716
mov eax, dword [0x43124c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00409c82
jmp 0x40a74f
mov dword [esp], ebx
mov eax, esi
sub esi, 0x15
shl eax, 0xd
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.00409d52
cmp esi, 6
push eax
push eax
ja 0x40a751
mov dword [esp], ebx
call fcn.00409e91
push esi
jmp 0x40a751
mov dword [esp], ebx
not esi
mov dword [esp + 4], esi
call fcn.0040a4b7
push ecx
push ecx
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push edx
lea edx, [ebx + eax*2]
jmp 0x40a77a
lea edx, [ebx + 2]
cmp eax, 4
jne 0x40a774
movzx eax, word [edi + 2]
add edi, 4
mov word [ebx], ax
jmp 0x40a77a
mov word [ebx], ax
add edi, 2
mov ebx, edx
jmp 0x40a50e
mov word [ebx], 0
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call fcn.00409e7b
push eax
cmp dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0x446380
je 0x40a7b8
mov dword [ebp + 0xc], 0x446380
mov eax, dword [ebp - 0x2c]
mov dword [ebp + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00409d52
mov eax, dword [ebp - 0x30]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8