Function at 0x10001090
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
cmp dword [ebp + 8], 0
je 0x100010a2
cmp dword [ebp + 0xc], 0
jne 0x100010a9
xor eax, eax
jmp 0x100012e5
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
mov ecx, 1
test ecx, ecx
je 0x10001129
mov edx, dword [ebp - 0xc]
add edx, dword [ebp - 8]
push edx
call fcn.100017d0
add esp, 4
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x100010de
xor eax, eax
jmp 0x100012e5
mov dword [ebp - 4], 0
jmp 0x100010f0
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x18]
jae 0x10001116
mov edx, dword [ebp - 8]
add edx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
movzx ecx, byte [eax + edx]
cmp ecx, 0xe9
jne 0x10001114
xor eax, eax
jmp 0x100012e5
jmp 0x100010e7
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0x18]
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 5
jb 0x10001127
jmp 0x10001129
jmp 0x100010b6
push 4
push 0x1000
mov eax, dword [ebp - 8]
add eax, 5
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x1000114f
xor eax, eax
jmp 0x100012e5
lea ecx, [ebp - 0x20]
push ecx
push 0x40
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x10001184
push 0x8000
push 0
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x100012e5
mov dword [ebp - 4], 0
jmp 0x10001196
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jae 0x100011b0
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
add edx, dword [ebp - 4]
mov al, byte [edx]
mov byte [ecx], al
jmp 0x1000118d
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 8]
mov byte [ecx], 0xe9
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
lea ecx, [eax + edx + 1]
mov dword [ebp - 0x1c], ecx
mov edx, 1
imul eax, edx, 5
add eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
sub ecx, eax
mov edx, dword [ebp - 0x1c]
mov dword [edx], ecx
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 8]
add edx, 5
push edx
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x1000122b
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0x8000
push 0
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x100012e5
mov eax, 1
imul ecx, eax, 0
mov edx, dword [ebp - 0xc]
mov byte [edx + ecx], 0xe9
mov eax, 1
shl eax, 0
add eax, dword [ebp - 0xc]
mov dword [ebp - 0x1c], eax
mov ecx, 1
imul edx, ecx, 5
add edx, dword [ebp - 0xc]
mov eax, dword [ebp + 0xc]
sub eax, edx
mov ecx, dword [ebp - 0x1c]
mov dword [ecx], eax
mov dword [ebp - 4], 5
jmp 0x1000126f
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jae 0x10001282
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 4]
mov byte [ecx], 0x90
jmp 0x10001266
lea edx, [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x100012e2
mov dword [ebp - 4], 0
jmp 0x100012b3
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 8]
jae 0x100012cd
mov edx, dword [ebp - 0xc]
add edx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 4]
mov cl, byte [eax]
mov byte [edx], cl
jmp 0x100012aa
push 0x8000
push 0
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x100012e5
mov eax, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret