Function at 0x10049130
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1015a54c], eax
je 0x10049153
mov eax, 0x10dd
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [0x1015a550]
cmp eax, ebx
jne 0x10049366
push edi
mov edi, dword [ebp + 8]
cmp edi, ebx
jne 0x10049175
pop edi
mov eax, 6
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edi]
cmp eax, ebx
jne 0x10049193
mov dword [0x1015a554], edi
mov eax, 6
pop edi
mov dword [0x1015a550], eax
pop ebx
mov esp, ebp
pop ebp
ret 8
push esi
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
call fcn.10048740
mov esi, eax
mov eax, dword [ebp + 0xc]
call fcn.10048740
mov dword [ebp + 0xc], eax
cmp eax, esi
jne 0x100491c1
cmp dword [0x1015a544], ebx
jne 0x1004935c
jmp 0x10049337
push 0x18
call fcn.10071bdd
add esp, 4
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x100491da
lea ebx, [eax + 8]
jmp 0x10049337
mov eax, esi
call fcn.100489d0
mov dword [ebp - 4], eax
test eax, eax
jne 0x100491f0
lea ebx, [eax + 8]
jmp 0x10049337
xor ecx, ecx
mov dword [eax + 0x38], ecx
mov dword [eax + 0x3c], ecx
mov ebx, eax
add eax, 0x1e
mov edi, esi
mov dword [ebp - 0x1c], eax
jmp 0x10049207
mov ebx, dword [ebp - 8]
push ebx
lea edx, [ebp - 0x10]
mov ecx, edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], 0
call fcn.100498c0
mov edi, eax
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x14]
add eax, edi
add ebx, eax
mov eax, dword [ebp - 4]
mov dword [ebp - 8], ebx
mov cl, byte [ebp - 8]
sub cl, al
add cl, cl
mov ebx, edi
add cl, cl
sub ebx, esi
mov dl, bl
add cl, cl
and dl, 7
xor cl, dl
mov byte [eax + 0x38], cl
mov ecx, dword [ebp - 0x14]
call fcn.100487b0
test eax, eax
jne 0x1004925a
cmp ebx, 5
jb 0x10049204
jmp 0x1004927a
cmp ebx, 5
jae 0x1004927a
nop
cmp byte [edi], 0x90
jne 0x10049271
inc edi
mov ebx, edi
sub ebx, esi
cmp ebx, 5
jb 0x10049260
jmp 0x1004927a
cmp ebx, 5
jb 0x10049329
mov eax, dword [ebp - 8]
mov edi, dword [ebp - 0x1c]
cmp eax, edi
jbe 0x10049285
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 fcn.10077f40
add esp, 0xc
cmp ebx, 0x19
jbe 0x100492ac
mov ebx, 6
jmp 0x10049337
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]
sub ecx, edx
mov byte [eax], 0xe9
mov dword [eax + 1], ecx
lea ecx, [eax + 5]
mov eax, edi
call fcn.10048710
lea ecx, [ebp - 0x18]
push ecx
push 0x40
push ebx
xor edi, edi
push esi
mov dword [ebp - 0x18], edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x100492f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x10049337
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 4]
mov dword [eax + 0xc], esi
mov dword [eax + 4], edi
mov dword [eax + 0x10], ecx
mov ecx, dword [0x1015a55c]
mov dword [eax + 8], edx
mov edx, dword [ebp - 0x18]
pop esi
pop edi
mov dword [eax + 0x14], edx
mov dword [eax], ecx
mov dword [0x1015a55c], eax
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp dword [0x1015a544], 0
mov ebx, 9
jne 0x1004933d
mov dword [0x1015a550], ebx
mov edi, dword [ebp - 4]
test edi, edi
je 0x10049349
call fcn.10048b60
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x10049359
push eax
call fcn.100719b6
add esp, 4
mov edi, dword [ebp + 8]
pop esi
mov dword [0x1015a554], edi
mov eax, ebx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 8