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

Disassembly:
push ebp
push edi
push esi
push ebx
mov esi, eax
sub esp, 0x4c
mov ebp, dword [0x46f960]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ecx
test ebp, ebp
jle 0x412e30
mov eax, dword [0x46f964]
lea edx, [eax + 4]
xor eax, eax
lea esi, [esi]
mov ecx, dword [edx]
cmp esi, ecx
jb 0x412c74
mov ebx, dword [edx + 4]
add ecx, dword [ebx + 8]
cmp esi, ecx
jb 0x412dd0
add eax, 1
add edx, 0xc
cmp eax, ebp
jne 0x412c60
mov dword [esp], esi
call fcn.00413640
test eax, eax
mov edi, eax
je 0x412e57
lea ebx, [ebp + ebp*2]
mov ebp, dword [0x46f964]
shl ebx, 2
add ebp, ebx
mov dword [ebp + 8], eax
mov dword [ebp], 0
call fcn.00413740
add eax, dword [edi + 0xc]
lea ecx, [esp + 0x24]
mov dword [esp + 0x1c], ecx
mov dword [ebp + 4], eax
mov eax, dword [0x46f964]
mov dword [esp + 4], ecx
mov dword [esp + 8], 0x1c
mov ebp, dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call ebp
sub esp, 0xc
test eax, eax
mov ecx, dword [esp + 0x1c]
je 0x412e37
mov eax, dword [esp + 0x38]
cmp eax, 4
je 0x412cfd
cmp eax, 0x40
jne 0x412de0
add dword [0x46f960], 1
mov dword [esp + 8], 0x1c
mov dword [esp + 4], ecx
mov dword [esp], esi
call ebp
sub esp, 0xc
test eax, eax
je 0x412e67
mov eax, dword [esp + 0x38]
cmp eax, 4
je 0x412d2e
cmp eax, 0x40
jne 0x412d50
mov eax, dword [esp + 0x18]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
lea ebp, [esp + 0x20]
mov dword [esp + 8], 0x40
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call ebx
sub esp, 0x10
mov eax, dword [esp + 0x18]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x38]
cmp eax, 0x40
je 0x412d46
cmp eax, 4
je 0x412d46
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call ebx
sub esp, 0x10
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
lea ecx, [esp + 0x24]
mov ebp, dword [sym.imp.KERNEL32.dll_VirtualQuery]
jmp 0x412d04
mov eax, dword [esp + 0x30]
add ebx, dword [0x46f964]
mov dword [esp + 0x1c], ecx
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
mov ecx, dword [esp + 0x1c]
jne 0x412cfd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00412bd0
xor ebp, ebp
jmp 0x412c7e
mov eax, dword [0x46f964]
mov eax, dword [eax + ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00412bd0
mov dword [esp + 4], esi
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00412bd0
mov dword [esp + 8], esi
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.00412bd0
nop