Function at 0x404d87
Capabilities:
Copy file
Get common file path
Persist via lnk shortcut
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov ecx, dword [0x411b18]
or dword [ebp - 8], 0xffffffff
push esi
xor esi, esi
push edi
mov edi, dword [0x411ab0]
cmp ecx, esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x20], esi
je 0x404dbb
lea eax, [edi + 1]
xor edx, edx
imul eax, eax, 0x64
div ecx
mov dword [ebp - 0x18], eax
inc edi
push ebx
cmp edi, ecx
mov dword [0x411ab0], edi
jae 0x4055bd
mov esi, dword [0x411aac]
push esi
call fcn.004027f1
mov dword [0x411aac], eax
and word [esi + 2], 0
mov eax, dword [0x411b30]
push esi
xor dword [esi + 0x12], eax
mov eax, dword [0x411a98]
and byte [eax], 0
call fcn.00404327
push dword [0x411a9c]
mov dword [ebp - 0x14], eax
call fcn.00408212
add esp, 0xc
test byte [esi + 0x16], 1
je 0x404e21
push dword [0x411a9c]
push dword [0x411a90]
call fcn.0040a150
pop ecx
pop ecx
mov eax, dword [0x411ab0]
xor edx, edx
inc eax
imul eax, eax, 0x64
div dword [0x411b18]
mov dword [ebp - 0x1c], eax
mov al, byte [esi + 0x1a]
cmp al, 2
je 0x4054fb
cmp al, 3
jne 0x404e55
push dword [0x411a9c]
call fcn.00408549
pop ecx
jmp 0x4054fb
cmp dword [ebp - 0x14], 0
push 1
pop ebx
je 0x404eae
cmp byte [esi + 0x17], 3
jne 0x404e68
xor ebx, ebx
jmp 0x404ebd
and dword [ebp - 0xc], 0
push 0
push dword [0x411a9c]
call section..text
mov edi, eax
pop ecx
cmp edi, 0xffffffff
pop ecx
je 0x404ea6
push edi
call fcn.0040114d
cmp eax, dword [esi + 0xe]
pop ecx
jne 0x404e9f
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0xc]
push eax
push edi
call fcn.00402546
add esp, 0xc
push edi
call fcn.00401229
pop ecx
mov eax, dword [ebp - 0xc]
cmp eax, dword [esi + 0x12]
je 0x404e64
test byte [esi + 0x16], 6
je 0x404ebd
push esi
call fcn.0040456c
pop ecx
mov ebx, eax
and dword [0x411b24], 0
test ebx, ebx
je 0x405444
lea ecx, [ebp - 0x1a4]
call fcn.00409a2a
push dword [0x411a9c]
call fcn.00408549
push dword [0x411a9c]
push dword [0x411a98]
call fcn.0040a150
push str..__A
push dword [0x411a98]
call fcn.004082ed
xor edi, edi
push edi
push dword [0x411a98]
call section..text
add esp, 0x1c
cmp eax, 0xffffffff
je 0x404f49
push eax
call fcn.00401229
push dword [0x411a98]
call fcn.0040a0d0
mov ecx, dword [0x411a98]
inc byte [eax + ecx - 1]
push edi
push dword [0x411a98]
lea eax, [eax + ecx - 1]
call section..text
add esp, 0x10
jmp 0x404f14
test byte [esi + 0x16], 0x20
je 0x405025
lea eax, [ebp - 4]
push eax
push 0x104
call fcn.004083a1
push dword [0x411bf8]
push dword [ebp - 4]
call fcn.0040a150
push 0x5c
push dword [ebp - 4]
call fcn.0040a360
mov edi, eax
xor ebx, ebx
add esp, 0x18
cmp edi, ebx
je 0x404f87
inc edi
jmp 0x404f8a
mov edi, dword [ebp - 4]
push ebx
push esi
call fcn.00403753
push eax
push edi
call fcn.0040a150
add esp, 0x10
push ebx
push dword [0x411a98]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x404fdc
mov dword [0x411b24], 0x3e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push esi
mov dword [0x411b20], eax
call fcn.00403753
push eax
push dword [0x411a94]
call fcn.0040a150
add esp, 0x10
jmp 0x40500a
push 2
push dword [0x411a98]
call fcn.0040a443
pop ecx
test eax, eax
pop ecx
je 0x40500a
cmp dword [0x411c7c], 0xd
jne 0x40500a
push 0x180
push dword [0x411a98]
call fcn.0040a404
pop ecx
pop ecx
lea eax, [ebp - 4]
push eax
call fcn.004083d4
cmp dword [0x411b24], ebx
pop ecx
je 0x4052e2
jmp 0x4053e7
push dword [0x411a98]
call fcn.0040104d
mov ebx, eax
pop ecx
cmp ebx, 0xffffffff
mov dword [ebp - 8], ebx
jne 0x405050
push dword [0x411a98]
mov dword [0x411b24], 0x11
jmp 0x405416
mov al, byte [esi + 0x16]
test al, 0x10
je 0x40525f
movzx eax, word [esi + 0x1e]
xor ebx, ebx
mov edi, dword [eax*4 + 0x411bb0]
add edi, 4
cmp dword [esi + 0x20], ebx
jle 0x40507f
push edi
call fcn.004027f1
inc ebx
pop ecx
cmp ebx, dword [esi + 0x20]
mov edi, eax
jl 0x405070
test byte [edi + 0x16], 0x20
je 0x405164
push dword [ebp - 8]
call fcn.00401229
or dword [ebp - 8], 0xffffffff
lea eax, [ebp - 4]
push eax
push 0x104
call fcn.004083a1
push dword [0x411bf8]
push dword [ebp - 4]
call fcn.0040a150
push 0x5c
push dword [ebp - 4]
call fcn.0040a360
mov ebx, eax
add esp, 0x1c
test ebx, ebx
je 0x4050c7
inc ebx
jmp 0x4050ca
mov ebx, dword [ebp - 4]
push 0
push esi
call fcn.00403753
push eax
push ebx
call fcn.0040a150
add esp, 0x10
xor ebx, ebx
push ebx
push dword [0x411a98]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40511f
mov dword [0x411b24], 0x3e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push esi
mov dword [0x411b20], eax
call fcn.00403753
push eax
push dword [0x411a94]
call fcn.0040a150
add esp, 0x10
jmp 0x40514d
push 2
push dword [0x411a98]
call fcn.0040a443
pop ecx
test eax, eax
pop ecx
je 0x40514d
cmp dword [0x411c7c], 0xd
jne 0x40514d
push 0x180
push dword [0x411a98]
call fcn.0040a404
pop ecx
pop ecx
lea eax, [ebp - 4]
push eax
call fcn.004083d4
cmp dword [0x411b24], ebx
pop ecx
je 0x4051cd
jmp 0x4053e7
push dword [edi + 6]
call fcn.0040324e
test eax, eax
pop ecx
mov dword [0x411b24], eax
jne 0x40541c
movzx eax, word [esi + 0x1e]
mov eax, dword [eax*4 + 0x411b98]
cmp word [eax + 2], 0
je 0x405194
push dword [0x411af4]
jmp 0x405196
push 0
call fcn.004055f2
pop ecx
push dword [edi + 0xa]
lea ecx, [ebp - 0x1a4]
push dword [0x411058]
push dword [ebp - 8]
call fcn.00409ae5
cmp dword [0x411c10], 2
je 0x40541c
push dword [ebp - 8]
call fcn.00401229
or dword [ebp - 8], 0xffffffff
pop ecx
push 0
push dword [0x411a98]
call section..text
mov ebx, eax
pop ecx
cmp ebx, 0xffffffff
pop ecx
jne 0x4051f8
push dword [0x411a98]
mov dword [0x411b24], 0x10
jmp 0x4053e1
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
call fcn.00402546
push ebx
call fcn.00401229
mov eax, dword [edi + 0x12]
add esp, 0x10
xor eax, dword [0x411b30]
cmp dword [ebp - 0xc], eax
jne 0x4053d1
mov eax, dword [0x411bc8]
cmp word [eax + 2], 0
je 0x405235
push dword [0x411af4]
jmp 0x405237
push 0
call fcn.004055f2
pop ecx
push dword [ebp - 0x1c]
push dword [ebp - 0x18]
push dword [0x411a98]
push esi
call fcn.004046be
add esp, 0x10
test eax, eax
jne 0x4052e2
jmp 0x4053e7
test al, 1
je 0x40530e
mov ecx, dword [0x411bd8]
cmp ecx, edi
je 0x4052e2
mov eax, dword [0x411bd4]
test eax, eax
je 0x4052e2
push eax
push ecx
push dword [ebp - 8]
call fcn.004010cd
add esp, 0xc
mov dword [0x411b24], eax
test eax, eax
jne 0x40541c
push dword [esi + 6]
call fcn.0040324e
test eax, eax
pop ecx
mov dword [0x411b24], eax
jne 0x40541c
push eax
call fcn.004055f2
pop ecx
push dword [esi + 0xa]
lea ecx, [ebp - 0x1a4]
push dword [0x411058]
push dword [ebp - 8]
call fcn.00409ae5
cmp dword [0x411c10], 2
je 0x40541c
push dword [ebp - 8]
call fcn.00401229
or dword [ebp - 8], 0xffffffff
pop ecx
cmp dword [ebp - 0x14], 0
push dword [0x411a98]
je 0x4053f7
push dword [0x411a9c]
call fcn.004066d8
pop ecx
mov dword [0x411ac4], 1
pop ecx
jmp 0x4053ff
push dword [esi + 6]
call fcn.0040324e
cmp eax, edi
pop ecx
mov dword [0x411b24], eax
jne 0x40541c
movzx eax, word [esi + 0x1e]
mov eax, dword [eax*4 + 0x411b98]
cmp word [eax + 2], di
je 0x40533d
push dword [0x411af4]
jmp 0x40533e
push edi
call fcn.004055f2
pop ecx
push dword [esi + 0xa]
lea ecx, [ebp - 0x1a4]
push dword [0x411058]
push ebx
call fcn.00409ae5
cmp dword [0x411c10], 2
je 0x40541c
mov al, byte [esi + 0x16]
test al, 8
je 0x405387
test al, 6
lea eax, [esi + 0x38]
jne 0x405377
lea eax, [esi + 0x24]
lea ecx, [eax + 0x10]
push ecx
lea ecx, [eax + 8]
push ecx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push dword [ebp - 8]
call fcn.00401229
or dword [ebp - 8], 0xffffffff
push 0
push dword [0x411a98]
call section..text
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
je 0x4051e3
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x18]
push eax
push edi
call fcn.00402546
push edi
call fcn.00401229
mov eax, dword [ebp - 0x18]
add esp, 0x10
cmp eax, dword [esi + 0x12]
je 0x4052e2
push dword [0x411a9c]
mov dword [0x411b24], 0x15
call fcn.004027fb
pop ecx
lea ecx, [ebp - 0x1a4]
call fcn.00409a36
jmp 0x4055bd
push esi
call fcn.00405641
pop ecx
pop ecx
cmp word [esi + 2], 0x1b
jne 0x40542c
push dword [0x411a9c]
mov dword [0x411b24], 0x16
call fcn.004027fb
pop ecx
lea ecx, [ebp - 0x1a4]
call fcn.00409a36
jmp 0x4055a8
lea ecx, [ebp - 0x1a4]
call fcn.00409a36
cmp dword [0x411b24], 0
jne 0x4055a8
test byte [esi + 0x16], 1
je 0x40544f
and word [esi + 2], 0
cmp byte [esi + 0x17], 0
je 0x4054dd
cmp byte [esi + 0x19], 1
jne 0x4054dd
lea eax, [ebp - 0x10]
push eax
push 0xf003f
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionSharedDLLs
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4054dd
push 1
lea eax, [ebp - 0x14]
pop ebx
push 4
mov dword [ebp - 4], ebx
pop edi
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
push dword [0x411a9c]
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], edi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4054b3
inc dword [ebp - 4]
jmp 0x4054b9
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], edi
push dword [ebp - 0x14]
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
push 0
push dword [0x411a9c]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [esi + 0x17], 3
jne 0x4054ef
push dword [0x411a9c]
call fcn.0040581b
pop ecx
cmp byte [esi + 0x1b], 1
jne 0x4054fb
mov dword [0x411ab8], esi
cmp byte [esi + 0x18], 1
jne 0x405507
mov dword [0x411ac0], esi
cmp byte [esi + 0x18], 2
jne 0x405513
mov dword [0x411abc], esi
push 4
push esi
call fcn.00403753
mov edi, eax
pop ecx
pop ecx
cmp byte [edi], 0
je 0x405598
push 5
push esi
call fcn.00403753
pop ecx
mov ebx, eax
pop ecx
lea eax, [ebp - 0x18]
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x405598
lea eax, [ebp - 0x22c]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x405598
lea eax, [ebp - 0x22c]
push eax
call fcn.0040832c
lea eax, [ebp - 0x22c]
push edi
push eax
call fcn.0040a160
lea eax, [ebp - 0x22c]
push str..lnk
push eax
call fcn.0040a160
push 0
lea eax, [ebp - 0x22c]
push ebx
push eax
push dword [0x411a9c]
call fcn.004018e8
add esp, 0x24
push dword [ebp - 0x1c]
call fcn.004081f1
pop ecx
mov dword [ebp - 0x10], 1
cmp dword [ebp - 8], 0xffffffff
je 0x4055b7
push dword [ebp - 8]
call fcn.00401229
pop ecx
cmp dword [ebp - 0x10], 0
jne 0x4055ce
mov eax, dword [0x411a98]
cmp byte [eax], 0
je 0x4055ce
push eax
call fcn.0040a50d
pop ecx
test esi, esi
pop ebx
je 0x4055db
mov eax, dword [0x411b30]
xor dword [esi + 0x12], eax
cmp dword [ebp - 0x20], 0
pop edi
pop esi
je 0x4055ed
lea eax, [ebp - 0x20]
push eax
call fcn.004083d4
pop ecx
mov eax, dword [ebp - 0x10]
leave
ret