Function at 0x10004520
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 0x10]
mov dword [ebp - 4], 0
test eax, eax
je 0x1000453a
mov dword [eax], 0
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x10004547
mov dword [eax], 0
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x10004554
mov dword [eax], 0
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x10004566
lea eax, [edi + 0x57]
pop edi
mov esp, ebp
pop ebp
ret 0x14
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x10056b28], eax
je 0x10004580
mov eax, 0x10dd
pop edi
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [0x10056b2c]
test eax, eax
jne 0x10004915
mov eax, dword [ebp + 8]
test eax, eax
jne 0x100045a0
mov eax, 6
pop edi
mov esp, ebp
pop ebp
ret 0x14
push esi
mov esi, dword [eax]
test esi, esi
jne 0x100045c1
mov dword [0x10056b30], eax
lea eax, [esi + 6]
pop esi
mov dword [0x10056b2c], 6
pop edi
mov esp, ebp
pop ebp
ret 0x14
push ebx
xor ebx, ebx
mov dword [ebp + 0xc], 0
cmp byte [esi], 0xff
jne 0x100045ef
cmp byte [esi + 1], 0x25
jne 0x100045ef
mov eax, dword [esi + 2]
push eax
push esi
mov dword [ebp - 0x10], eax
call fcn.10004250
add esp, 8
test al, al
je 0x100045ef
mov esi, dword [ebp - 0x10]
mov esi, dword [esi]
cmp byte [esi], 0xeb
jne 0x10004630
movsx eax, byte [esi + 1]
add esi, 2
add esi, eax
mov al, byte [esi]
cmp al, 0xff
jne 0x10004624
cmp byte [esi + 1], 0x25
jne 0x10004624
mov eax, dword [esi + 2]
push eax
push esi
mov dword [ebp - 0x10], eax
call fcn.10004250
add esp, 8
test al, al
je 0x10004630
mov esi, dword [ebp - 0x10]
mov esi, dword [esi]
jmp 0x10004630
cmp al, 0xe9
jne 0x10004630
mov eax, dword [esi + 1]
add esi, 5
add esi, eax
cmp byte [edi], 0xff
jne 0x10004654
cmp byte [edi + 1], 0x25
jne 0x10004654
mov eax, dword [edi + 2]
push eax
push edi
mov dword [ebp - 0x10], eax
call fcn.10004250
add esp, 8
test al, al
je 0x10004654
mov edi, dword [ebp - 0x10]
mov edi, dword [edi]
cmp byte [edi], 0xeb
jne 0x10004695
movsx eax, byte [edi + 1]
add edi, 2
add edi, eax
mov al, byte [edi]
cmp al, 0xff
jne 0x10004689
cmp byte [edi + 1], 0x25
jne 0x10004689
mov eax, dword [edi + 2]
push eax
push edi
mov dword [ebp - 0x10], eax
call fcn.10004250
add esp, 8
test al, al
je 0x10004695
mov edi, dword [ebp - 0x10]
mov edi, dword [edi]
jmp 0x10004695
cmp al, 0xe9
jne 0x10004695
mov eax, dword [edi + 1]
add edi, 5
add edi, eax
cmp edi, esi
jne 0x100046b1
cmp dword [0x10056b20], ebx
jne 0x10004908
xor eax, eax
mov dword [0x10056b2c], eax
jmp 0x100048dc
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x100046ba
mov dword [eax], esi
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x100046c3
mov dword [eax], edi
push 0x18
call fcn.100090c2
mov ebx, eax
add esp, 4
mov dword [ebp + 0x14], ebx
test ebx, ebx
jne 0x100046e8
mov eax, 8
mov dword [ebp - 4], eax
mov dword [0x10056b2c], eax
jmp 0x100048dc
push esi
call fcn.10003d40
mov ebx, eax
add esp, 4
mov dword [ebp + 0xc], ebx
test ebx, ebx
jne 0x1000470f
mov ebx, dword [ebp + 0x14]
mov eax, 8
mov dword [ebp - 4], eax
mov dword [0x10056b2c], eax
jmp 0x100048dc
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x10004718
mov dword [eax], ebx
lea eax, [ebx + 0x38]
xorps xmm0, xmm0
lea edx, [ebx + 0x1e]
movq qword [eax], xmm0
mov dword [ebp - 0xc], edx
mov ecx, ebx
xor edx, edx
mov dword [ebp - 0x18], eax
mov eax, esi
mov dword [ebp + 0x18], ecx
mov dword [ebp - 8], edx
nop word [eax + eax]
lea edx, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push edx
push 0
push eax
mov ebx, eax
lea eax, [ebp - 0xc]
push eax
push ecx
mov dword [ebp - 0x1c], ebx
call fcn.10006ec0
mov ecx, dword [ebp + 0x18]
mov edx, eax
mov eax, dword [ebp - 0x10]
sub eax, ebx
mov dword [ebp - 4], edx
add eax, edx
mov ebx, edx
mov edx, dword [ebp - 0x18]
add ecx, eax
mov dword [ebp + 0x18], ecx
sub ebx, esi
sub cl, byte [ebp + 0xc]
mov al, bl
and al, 7
shl cl, 3
or cl, al
mov eax, dword [ebp - 8]
mov byte [edx + eax], cl
inc eax
mov edx, dword [ebp - 4]
mov dword [ebp - 8], eax
cmp eax, 8
jae 0x100047b5
push dword [ebp - 0x1c]
call fcn.10003e90
add esp, 4
test eax, eax
jne 0x100047b2
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x18]
cmp ebx, 5
jb 0x10004740
jmp 0x100047ec
mov edx, dword [ebp - 4]
cmp ebx, 5
jae 0x100047e9
nop word [eax + eax]
push edx
call fcn.10004080
add esp, 4
test eax, eax
je 0x100047e0
mov edx, dword [ebp - 4]
add edx, eax
mov ebx, edx
mov dword [ebp - 4], edx
sub ebx, esi
cmp ebx, 5
jb 0x100047c0
jmp 0x100047e9
cmp ebx, 5
jb 0x100048be
mov ecx, dword [ebp + 0x18]
cmp dword [ebp - 8], 8
ja 0x100048be
cmp ecx, dword [ebp - 0xc]
jbe 0x100047fc
int3
mov eax, dword [ebp + 0xc]
sub cl, al
push ebx
push esi
mov byte [eax + 0x1e], cl
mov byte [eax + 0x36], bl
add eax, 0x20
push eax
call fcn.1000b6c0
add esp, 0xc
cmp ebx, 0x19
jbe 0x1000482f
mov ebx, dword [ebp + 0x14]
mov eax, 6
mov dword [ebp - 4], eax
mov dword [0x10056b2c], eax
jmp 0x100048dc
mov eax, dword [ebp + 0xc]
lea edx, [esi + ebx]
movzx ecx, byte [eax + 0x1e]
add ecx, eax
mov dword [eax + 0x40], edx
mov dword [eax + 0x44], edi
lea eax, [ecx + 5]
mov byte [ecx], 0xe9
sub edx, eax
lea eax, [ecx + 5]
mov dword [ecx + 1], edx
push dword [ebp - 0xc]
push eax
call fcn.10004030
add esp, 8
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push eax
push 0x40
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x10004887
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 4], eax
mov dword [0x10056b2c], eax
jmp 0x100048dc
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
pop ebx
mov dword [ecx + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [ecx + 0x10], eax
mov dword [ecx + 0xc], esi
mov dword [ecx + 4], 0
mov eax, dword [ebp - 0x14]
mov dword [ecx + 0x14], eax
mov eax, dword [0x10056b38]
pop esi
mov dword [ecx], eax
xor eax, eax
mov dword [0x10056b38], ecx
pop edi
mov esp, ebp
pop ebp
ret 0x14
cmp dword [0x10056b20], 0
mov eax, 9
mov dword [ebp - 4], eax
jne 0x100048d9
mov ebx, dword [ebp + 0x14]
mov dword [0x10056b2c], eax
jmp 0x100048dc
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x100048f9
push eax
call fcn.10003f90
mov eax, dword [ebp + 0x10]
add esp, 4
test eax, eax
je 0x100048f9
mov dword [eax], 0
test ebx, ebx
je 0x10004908
push 0x18
push ebx
call fcn.100093b2
add esp, 8
mov eax, dword [ebp + 8]
pop ebx
mov dword [0x10056b30], eax
mov eax, dword [ebp - 4]
pop esi
pop edi
mov esp, ebp
pop ebp
ret 0x14