Function at 0x403470
Capabilities:
Copy file
Create process on windows
Query or enumerate registry value
Write and execute a file
Write file on windows

Disassembly:
sub esp, 0xe70
push ebx
push esi
push edi
mov ecx, 7
mov esi, 0x40a510
lea edi, [esp + 0x878]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov ecx, 0x78
xor eax, eax
lea edi, [esp + 0x896]
mov dword [esp + 0x14], 0x200
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0xc]
lea ecx, [esp + 0x878]
push eax
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40383d
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x14]
lea eax, [esp + 0x678]
push edx
push eax
push 0
push 0
push 0x40a4fc
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40383d
lea edi, [esp + 0x678]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x278]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x278]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40a4ec
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x27c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00408146
add esp, 8
cmp eax, 0xffffffff
je 0x403832
lea edi, [esp + 0x678]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x278]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x278]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40a4dc
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x27c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00408146
add esp, 8
cmp eax, 0xffffffff
jne 0x40363a
lea ecx, [esp + 0x70]
push 0x208
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dl, byte [esp + eax + 0x70]
dec eax
cmp dl, 0x5c
jne 0x4035e9
mov byte [esp + eax + 0x71], 0
mov edi, 0x40a4cc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x70]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
push eax
and ecx, 3
lea eax, [esp + 0x27c]
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x74]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea edi, [esp + 0x678]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x278]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x278]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40a4b4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x80
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 2
mov ecx, ebx
push eax
push eax
and ecx, 3
lea eax, [esp + 0x28c]
push 0x40000000
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x403832
mov eax, dword [0x40f154]
mov dword [esp + 0x10], 0
test eax, eax
jle 0x403781
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, 0x40b154
lea ecx, [esp + 0x74]
push 0x104
push ecx
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push esi
push eax
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea edx, [esp + 0x74]
push edx
call fcn.0040818a
lea eax, [esp + 0x78]
lea ecx, [esp + 0xa84]
push eax
push ecx
call fcn.004046f9
lea edx, [esp + 0xa8c]
push edx
call fcn.004046dc
add esp, 0x10
lea ecx, [esp + 0x1c]
lea edx, [esp + 0xa7c]
lea eax, [eax + eax + 2]
push 0
push ecx
push 4
push edx
push ebx
mov dword [esp + 0xa90], eax
call ebp
mov ecx, dword [esp + 0xa7c]
lea eax, [esp + 0x1c]
push 0
push eax
lea edx, [esp + 0xa88]
push ecx
push edx
push ebx
call ebp
mov eax, dword [esp + 0x14]
mov ecx, dword [0x40f154]
inc eax
add esi, 0x200
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x4036df
pop ebp
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x678]
lea ecx, [esp + 0x278]
push eax
push 0x40a494
push ecx
mov dword [esp + 0x38], 0x44
call fcn.00404580
add esp, 0xc
lea edx, [esp + 0x1c]
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x278]
push edx
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40381b
mov edx, dword [esp + 0x1c]
push 0xffffffffffffffff
push edx
call dword [sym.imp.USER32.dll_WaitForInputIdle]
mov eax, dword [esp + 0x1c]
push eax
call esi
mov ecx, dword [esp + 0x20]
push ecx
call esi
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0xe70
ret
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0xe70
ret
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0xe70
ret