Function at 0x422532
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x45c0bc], eax
je 0x422553
mov eax, 0x10dd
jmp 0x42273b
mov eax, dword [0x45c0c0]
cmp eax, ebx
jne 0x42273b
push edi
mov edi, dword [ebp + 8]
cmp edi, ebx
jne 0x422570
push 6
pop eax
jmp 0x42273a
mov eax, dword [edi]
cmp eax, ebx
jne 0x422589
push 6
pop eax
mov dword [0x45c0c0], eax
mov dword [0x45c0c4], edi
jmp 0x42273a
push esi
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
call fcn.00422172
mov esi, eax
mov eax, dword [ebp + 0xc]
call fcn.00422172
mov dword [ebp + 0xc], eax
cmp eax, esi
jne 0x4225b7
cmp dword [0x45c0b4], ebx
jne 0x422731
jmp 0x42270d
push 0x18
call fcn.00427754
pop ecx
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x4225ce
push 8
pop ebx
jmp 0x42270d
mov eax, esi
call fcn.00421f86
mov ecx, eax
mov dword [ebp - 4], ecx
test ecx, ecx
je 0x4225c6
lea edi, [ecx + 0x38]
mov dword [ebp - 0x1c], edi
xor eax, eax
stosd dword es:[edi], eax
mov dword [ebp - 8], ecx
add ecx, 0x1e
stosd dword es:[edi], eax
mov edi, esi
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 8]
and dword [ebp - 0x10], 0
lea eax, [ebp - 0x10]
push eax
mov ecx, edi
mov dword [ebp - 0x14], edi
call fcn.00426861
mov edi, eax
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x14]
mov ebx, edi
add eax, edi
add dword [ebp - 8], eax
mov al, byte [ebp - 8]
sub al, byte [ebp - 4]
sub ebx, esi
mov cl, bl
and cl, 7
shl al, 3
xor al, cl
mov ecx, dword [ebp - 0x1c]
mov byte [ecx], al
mov ecx, dword [ebp - 0x14]
call fcn.00421dd4
test eax, eax
jne 0x42263f
cmp ebx, 5
jb 0x4225f3
cmp ebx, 5
jae 0x42265c
cmp byte [edi], 0x90
jne 0x422653
inc edi
mov ebx, edi
sub ebx, esi
cmp ebx, 5
jb 0x422644
cmp ebx, 5
jb 0x422701
mov eax, dword [ebp - 8]
mov edi, dword [ebp - 0x20]
cmp eax, edi
jbe 0x422667
int3
mov ecx, dword [ebp - 4]
sub al, cl
push ebx
mov byte [ecx + 0x36], bl
add ecx, 0x20
push esi
push ecx
mov byte [edi], al
call 0x42c8a0
add esp, 0xc
cmp ebx, 0x19
jbe 0x42268b
push 6
jmp 0x4225c8
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
mov dword [edx + 0x44], eax
movzx eax, byte [edi]
add eax, edx
lea ecx, [ebx + esi]
mov dword [edx + 0x40], ecx
lea edx, [eax + 5]
mov byte [eax], 0xe9
inc eax
sub ecx, edx
mov dword [eax], ecx
lea ecx, [eax + 4]
mov eax, edi
call fcn.00421db2
and dword [ebp - 0x18], 0
lea eax, [ebp - 0x18]
push eax
push 0x40
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4226d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x42270d
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 8]
and dword [eax + 4], 0
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 4]
mov dword [eax + 0x10], ecx
mov dword [eax + 0xc], esi
mov ecx, dword [ebp - 0x18]
mov dword [eax + 0x14], ecx
mov ecx, dword [0x45c0cc]
mov dword [eax], ecx
mov dword [0x45c0cc], eax
xor eax, eax
jmp 0x422739
cmp dword [0x45c0b4], 0
push 9
pop ebx
jne 0x422713
mov dword [0x45c0c0], ebx
mov edi, dword [ebp - 4]
test edi, edi
je 0x42271f
call fcn.004220e7
cmp dword [ebp - 0xc], 0
je 0x42272e
push dword [ebp - 0xc]
call fcn.004273e1
pop ecx
mov edi, dword [ebp + 8]
mov dword [0x45c0c4], edi
mov eax, ebx
pop esi
pop edi
pop ebx
leave
ret 8