Function at 0x422230
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x43bfc0]
xor eax, ebp
mov dword [ebp - 4], eax
push str._CS_15_2
call dword [sym.imp.VMProtectSDK32.dll_VMProtectBeginUltra]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x34], 0
jmp 0x422263
mov ecx, dword [ebp - 0x34]
add ecx, 1
mov dword [ebp - 0x34], ecx
cmp dword [ebp - 0x34], 0x2710
jae 0x422305
mov edx, 1
imul eax, edx, 0
mov ecx, dword [ebp - 0x20]
movsx edx, byte [ecx + eax]
cmp edx, 0xffffffe9
jne 0x4222fe
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 1]
mov eax, dword [ebp - 0x20]
lea ecx, [eax + edx + 5]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0x40
lea edx, [ebp - 0xc]
push edx
mov eax, dword [ebp - 8]
push eax
push 5
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x4222fc
mov dword [ebp - 0x28], 0
jmp 0x4222d7
mov edx, dword [ebp - 0x28]
add edx, 1
mov dword [ebp - 0x28], edx
cmp dword [ebp - 0x28], 5
jae 0x4222e8
mov eax, dword [ebp - 0x38]
add eax, dword [ebp - 0x28]
mov byte [eax], 0xcc
jmp 0x4222ce
lea ecx, [ebp - 8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
push 5
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x422300
jmp 0x422305
jmp 0x42225a
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
jmp 0x42231e
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x18], ecx
cmp dword [ebp - 0x18], 0xf4240
jae 0x42236b
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0x18]
movsx eax, byte [edx]
cmp eax, 0xffffffc3
jne 0x422340
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x18], ecx
jmp 0x42236b
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0x18]
movsx eax, byte [edx]
cmp eax, 0xffffffc2
jne 0x422359
mov ecx, dword [ebp - 0x18]
add ecx, 2
mov dword [ebp - 0x18], ecx
jmp 0x42236b
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0x18]
movsx eax, byte [edx]
cmp eax, 0xffffffcc
jne 0x422369
jmp 0x42236b
jmp 0x422315
mov dword [ebp - 0x30], fcn.0041f4e0
jmp 0x42237d
mov ecx, dword [ebp - 0x1c]
add ecx, 1
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], 0xf4240
jae 0x4223ca
mov edx, dword [ebp - 0x30]
add edx, dword [ebp - 0x1c]
movsx eax, byte [edx]
cmp eax, 0xffffffc3
jne 0x42239f
mov ecx, dword [ebp - 0x1c]
add ecx, 1
mov dword [ebp - 0x1c], ecx
jmp 0x4223ca
mov edx, dword [ebp - 0x30]
add edx, dword [ebp - 0x1c]
movsx eax, byte [edx]
cmp eax, 0xffffffc2
jne 0x4223b8
mov ecx, dword [ebp - 0x1c]
add ecx, 2
mov dword [ebp - 0x1c], ecx
jmp 0x4223ca
mov edx, dword [ebp - 0x30]
add edx, dword [ebp - 0x1c]
movsx eax, byte [edx]
cmp eax, 0xffffffcc
jne 0x4223c8
jmp 0x4223ca
jmp 0x422374
cmp dword [ebp - 0x18], 0
je 0x422462
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0x40
lea ecx, [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
je 0x422462
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x24], 0
jmp 0x422423
mov edx, dword [ebp - 0x2c]
add edx, 1
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x24]
add eax, 1
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [ebp - 0x18]
jae 0x42244c
mov edx, dword [ebp - 0x24]
cmp edx, dword [ebp - 0x1c]
jne 0x42243a
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
add ecx, dword [ebp - 0x24]
mov dl, byte [ecx]
mov byte [eax], dl
jmp 0x422411
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
call dword [sym.imp.VMProtectSDK32.dll_VMProtectEnd]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041d5bd
mov esp, ebp
pop ebp
ret