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

Disassembly:
sub esp, 0x6c
push ebx
push ebp
push esi
xor ebp, ebp
xor esi, esi
push edi
mov edi, dword [0x4a2058]
cmp dword [0x4a124c], ebp
jne 0x41a06e
push 0x4a121c
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x4a124c], 1
push 0x4a121c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, edi
call fcn.004199a0
mov ecx, 0x419660
mov ebx, eax
call fcn.004199a0
push 0x50
mov dword [esp + 0x20], eax
lea eax, [esp + 0x2c]
push ebp
push eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
call fcn.00446040
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
push ebx
call fcn.00419f90
mov edi, eax
add esp, 8
cmp edi, 5
jb 0x41a279
push edi
push ebx
call fcn.00419e20
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
push ebx
call fcn.00419bd0
mov esi, eax
add esp, 0x1c
cmp esi, ebp
je 0x41a274
lea eax, [esp + 0x18]
push eax
push 0x40
push edi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], ebp
mov ebp, dword [sym.imp.KERNEL32.dll_VirtualProtect]
push ebx
call ebp
test eax, eax
je 0x41a20f
lea ecx, [esp + 0x14]
push ecx
push 0x40
push 0x74
push esi
call ebp
test eax, eax
je 0x41a1f2
xor ebp, ebp
lea eax, [esi + 0x2c]
test edi, edi
jbe 0x41a140
mov edx, ebx
sub edx, eax
mov cl, byte [edx + eax]
mov byte [eax], cl
mov byte [esi + ebp + 0x4c], cl
inc ebp
inc eax
cmp ebp, edi
jb 0x41a131
lea eax, [esi + edi + 0x2c]
lea ecx, [edi + ebx]
lea ebp, [eax + 5]
cmp ebp, ecx
jbe 0x41a154
mov edx, ebp
sub edx, ecx
jmp 0x41a158
mov edx, ecx
sub edx, ebp
cmp edx, 0x7fff0000
ja 0x41a16a
sub ecx, ebp
mov byte [eax], 0xe9
mov dword [eax + 1], ecx
jmp 0x41a17b
mov byte [eax], 0xff
mov byte [eax + 1], 0x25
add eax, 2
lea edx, [eax + 4]
mov dword [eax], edx
mov dword [edx], ecx
mov ebp, dword [esp + 0x1c]
cmp ebp, ebx
jae 0x41a189
mov eax, ebx
sub eax, ebp
jmp 0x41a18d
mov eax, ebp
sub eax, ebx
mov ecx, ebp
cmp eax, 0x7fff0000
jbe 0x41a1b8
lea eax, [esi + 0xc]
call fcn.00419a00
sub eax, esi
sub eax, 0xc
push eax
lea eax, [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea ecx, [esi + 0xc]
mov eax, ebx
call fcn.00419a00
push edi
lea eax, [esi + 0x2c]
push eax
mov dword [esi + 4], edi
mov dword [esi], ebx
mov dword [esi + 8], ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x14]
push edx
push eax
push 0x74
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ebp, dword [sym.imp.KERNEL32.dll_VirtualProtect]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x18]
push ecx
push edx
push edi
push ebx
call ebp
xor ecx, ecx
cmp dword [esi], ecx
je 0x41a21f
lea eax, [esi + 0x2c]
mov dword [0x4a2058], eax
jmp 0x41a272
mov eax, dword [esi + 0x6c]
cmp eax, ecx
je 0x41a22c
mov edx, dword [esi + 0x70]
mov dword [eax + 0x70], edx
mov eax, dword [esi + 0x70]
cmp eax, ecx
je 0x41a239
mov edx, dword [esi + 0x6c]
mov dword [eax + 0x6c], edx
cmp dword [0x4a1250], esi
jne 0x41a249
mov eax, dword [esi + 0x70]
mov dword [0x4a1250], eax
mov dword [esi + 0x70], ecx
mov dword [esi + 0x6c], ecx
mov edx, dword [0x4a1254]
mov dword [esi + 0x70], edx
mov eax, dword [0x4a1254]
cmp eax, ecx
je 0x41a264
mov dword [eax + 0x6c], esi
dec dword [0x4a1258]
mov dword [0x4a1254], esi
xor esi, esi
xor ebp, ebp
call fcn.00419d90
push 0x4a121c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
xor eax, eax
cmp esi, ebp
pop esi
pop ebp
setne al
pop ebx
add esp, 0x6c
ret