Function at 0x402340
Capabilities:
Copy file
Create process on windows
Delete file
Persist via default file association registry key
Set current directory
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45f37c
mov eax, dword fs:[0]
push eax
mov eax, 0x1144
call fcn.0043b4c0
mov eax, dword [0x4778e0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1150], ecx
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
mov ecx, dword [ebp - 0x1150]
call fcn.0041bb06
push 0
call fcn.0041f374
add esp, 4
push 0x104
lea eax, [ebp - 0x1034]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x1034]
push ecx
call fcn.0043a920
add esp, 4
sub eax, 1
mov dword [ebp - 0x1038], eax
jmp 0x4023cd
mov edx, dword [ebp - 0x1038]
sub edx, 1
mov dword [ebp - 0x1038], edx
cmp dword [ebp - 0x1038], 0
jl 0x402408
mov eax, dword [ebp - 0x1038]
movsx ecx, byte [ebp + eax - 0x1034]
cmp ecx, 0x5c
jne 0x402406
mov edx, dword [ebp - 0x1038]
mov byte [ebp + edx - 0x1034], 0
lea eax, [ebp - 0x1034]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
jmp 0x402408
jmp 0x4023be
push 0x104
push 0x4628a4
lea ecx, [ebp - 0x31c]
push ecx
call fcn.0043b390
add esp, 0xc
push 0x4628b0
call fcn.0040d2d0
add esp, 4
push 0x4628b4
call fcn.0040d330
add esp, 4
lea ecx, [ebp - 0xf2c]
call fcn.0040c610
mov dword [ebp - 4], 0
push 0x4628b8
lea ecx, [ebp - 0xf2c]
call fcn.0040d1c0
test eax, eax
je 0x402487
push 0x104
lea edx, [ebp - 0x31c]
push edx
push 0x4628c4
push 0x4628d0
push 0x4628dc
lea ecx, [ebp - 0xf2c]
call fcn.0040cc20
mov eax, dword [ebp - 0x1150]
mov ecx, dword [eax + 0x48]
movsx edx, byte [ecx]
cmp edx, 0x31
je 0x4024cc
mov eax, dword [ebp - 0x1150]
mov ecx, dword [eax + 0x48]
movsx edx, byte [ecx]
cmp edx, 0x32
je 0x4024cc
mov eax, dword [ebp - 0x1150]
mov ecx, dword [eax + 0x48]
push ecx
mov ecx, dword [ebp - 0x1150]
call fcn.00402180
mov edx, dword [ebp - 0x1150]
mov dword [edx + 0xa4], eax
jmp 0x4024e3
mov ecx, dword [ebp - 0x1150]
call fcn.00402290
mov ecx, dword [ebp - 0x1150]
mov dword [ecx + 0xa4], eax
mov byte [ebp - 0x214], 0
push 0x1ff
push 0
lea edx, [ebp - 0x213]
push edx
call fcn.0043a9b0
add esp, 0xc
mov eax, dword [ebp - 0x1150]
mov ecx, dword [eax + 0x48]
movsx edx, byte [ecx]
test edx, edx
jne 0x402595
push 0x100
push 0x4628e4
lea eax, [ebp - 0x214]
push eax
call fcn.0043b390
add esp, 0xc
lea ecx, [ebp - 0x103c]
push ecx
push str.SoftwareDreamBaseGames_
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x402593
lea edx, [ebp - 0x1034]
push edx
push str._sXYDII.exe
lea eax, [ebp - 0x1144]
push eax
call fcn.0043b2c9
add esp, 0xc
lea ecx, [ebp - 0x1144]
push ecx
call fcn.0043a920
add esp, 4
add eax, 1
push eax
lea edx, [ebp - 0x1144]
push edx
push 1
push 0
push str.path
mov eax, dword [ebp - 0x103c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x4025e6
mov ecx, dword [ebp - 0x1150]
movzx edx, byte [ecx + 0x2a8]
test edx, edx
je 0x4025c8
push 0x200
mov eax, dword [ebp - 0x1150]
add eax, 0xa8
push eax
lea ecx, [ebp - 0x214]
push ecx
call fcn.0043b390
add esp, 0xc
jmp 0x4025e6
push 0x100
mov edx, dword [ebp - 0x1150]
mov eax, dword [edx + 0x48]
push eax
lea ecx, [ebp - 0x214]
push ecx
call fcn.0043b390
add esp, 0xc
mov edx, dword [ebp - 0x1150]
cmp dword [edx + 0xa4], 0
jne 0x402615
lea eax, [ebp - 0x31c]
push eax
lea ecx, [ebp - 0x1034]
push ecx
push str.xydii_shellopencommand
push str.xydii
call fcn.00402790
add esp, 0x10
movsx edx, byte [ebp - 0x214]
cmp edx, 0x31
je 0x4026af
movsx eax, byte [ebp - 0x214]
cmp eax, 0x32
jne 0x402647
push 0x5dc
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x462948
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov byte [ebp - 0x214], 0x31
push 0
push 0x462958
lea ecx, [ebp - 0x31c]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x402688
push 1
push 0
lea edx, [ebp - 0x214]
push edx
push 0x462968
push 0x462978
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov dword [ebp - 0x1148], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf2c]
call fcn.0040cfa0
mov eax, dword [ebp - 0x1148]
jmp 0x402777
push 0
lea ecx, [ebp - 0xed4]
call fcn.00403160
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1150]
lea ecx, [ebp - 0xed4]
mov dword [eax + 0x20], ecx
mov edx, dword [ebp - 0x1150]
mov eax, dword [edx + 0xa4]
push eax
lea ecx, [ebp - 0xed4]
call fcn.00402e90
push 0x20
lea ecx, [ebp - 0x214]
push ecx
call fcn.00402e70
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x402715
mov edx, dword [ebp - 0x10]
add edx, 1
push edx
lea ecx, [ebp - 0xed4]
call fcn.00404060
jmp 0x402725
push 0x46273a
lea ecx, [ebp - 0xed4]
call fcn.00404060
lea ecx, [ebp - 0xed4]
call fcn.0041e6c6
mov dword [ebp - 0x320], eax
push str.X2Update_.exe
mov ecx, dword [ebp - 0x1150]
call fcn.004028c0
mov dword [ebp - 0x114c], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xed4]
call fcn.00402eb0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf2c]
call fcn.0040cfa0
mov eax, dword [ebp - 0x114c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0043ae10
mov esp, ebp
pop ebp
ret