Function at 0x10002230
Capabilities:
Allocate or change rwx memory

Disassembly:
sub esp, 0x18
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov dword [esp + 0x24], ebp
mov eax, dword [ebp + 8]
test eax, eax
jne 0x10002250
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret 8
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [esp + 0x18], eax
jne 0x10002271
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8
lea edx, [esp + 0x20]
mov dword [esp + 0x1c], 0x40
push edx
push 0x40
push 7
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x10002297
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8
mov eax, dword [ebp + 0x14]
xor esi, esi
test eax, eax
je 0x1000233f
mov ecx, dword [ebp + 0x10]
mov esi, eax
mov eax, 0xdca01dcb
mov dword [esp + 0x10], 0
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 8
mov edx, ecx
je 0x1000230b
mov edi, dword [esp + 0x2c]
mov eax, esi
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [edi]
jne 0x100022ef
test cl, cl
je 0x100022eb
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [edi + 1]
jne 0x100022ef
add eax, 2
add edi, 2
test cl, cl
jne 0x100022cb
xor eax, eax
jmp 0x100022f4
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1000232f
mov eax, dword [esp + 0x10]
add esi, 0x113
inc eax
cmp eax, edx
mov dword [esp + 0x10], eax
jb 0x100022c5
mov ebx, dword [ebp + 0x14]
xor esi, esi
test edx, edx
jbe 0x10002343
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x10002343
add ebx, 0x113
inc esi
cmp esi, edx
jb 0x10002314
jmp 0x10002343
mov eax, dword [esi + 0x104]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8
mov ebx, dword [esp + 0x2c]
mov ecx, dword [ebp + 0x10]
mov eax, 0xdca01dcb
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 8
cmp esi, eax
jne 0x100023ac
lea eax, [ecx + 0x113]
mov dword [ebp + 0x10], eax
push eax
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.MSVCRT.dll_realloc]
mov esi, eax
add esp, 8
test esi, esi
mov dword [ebp + 0x14], esi
jne 0x10002386
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8
mov ecx, dword [ebp + 0x10]
mov eax, 0xdca01dcb
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 8
lea edx, [ecx + ecx*4]
lea eax, [ecx + edx*2]
lea eax, [eax + eax*4]
lea ecx, [esi + eax*4]
lea ebx, [eax + ecx - 0x113]
mov edi, dword [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
mov esi, dword [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov byte [esp + 0x10], 0xb8
and ecx, 3
mov word [esp + 0x15], 0xe0ff
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp + 4]
mov edx, dword [ebp + 8]
mov edi, dword [esp + 0x30]
mov esi, ecx
mov dword [esp + 0x11], edi
sub esi, eax
mov al, byte [ecx]
add esi, edx
cmp al, 0xeb
jne 0x10002464
cmp byte [ecx + 1], 0xf9
jne 0x10002464
cmp byte [ecx - 5], 0xe9
jne 0x10002464
lea eax, [ecx - 4]
add ecx, 0xfffffffc
mov dword [ebx + 0x108], eax
lea edx, [ebx + 0x10c]
mov ebp, dword [ecx]
mov dword [edx], ebp
mov bp, word [ecx + 4]
mov word [edx + 4], bp
mov ebp, dword [esp + 0x18]
mov cl, byte [ecx + 6]
mov byte [edx + 6], cl
mov edx, dword [eax]
sub edx, esi
mov byte [esi], 0x8b
add edx, ebp
mov byte [esi + 1], 0xff
mov dword [esi - 4], edx
mov ecx, dword [esp + 0x1c]
mov edx, dword [ebx + 0x108]
lea eax, [esp + 0x20]
push eax
push ecx
push 7
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebx + 0x108]
sub edi, ebp
mov ebp, dword [esp + 0x24]
mov dword [eax], edi
jmp 0x1000249a
mov eax, ecx
mov dword [ebx + 0x108], ecx
lea edx, [ebx + 0x10c]
mov edi, dword [eax]
mov dword [edx], edi
mov di, word [eax + 4]
mov word [edx + 4], di
mov al, byte [eax + 6]
mov byte [edx + 6], al
mov edx, dword [esp + 0x10]
mov ax, word [esp + 0x14]
mov dword [ecx], edx
mov dl, byte [esp + 0x16]
mov word [ecx + 4], ax
mov byte [ecx + 6], dl
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 0x20]
inc eax
mov dword [ebp + 0xc], eax
mov edx, dword [ebx + 0x108]
lea eax, [esp + 0x1c]
push eax
push ecx
push 7
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebx + 0x104], esi
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8