Function at 0x54dfd9
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 0x18
push esi
push edi
xor edi, edi
mov esi, edi
test eax, eax
je 0x54dfee
mov dword [eax], edi
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x54dff7
mov dword [eax], edi
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x54e000
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x60e0b0], eax
je 0x54e018
mov eax, 0x10dd
jmp 0x54e27b
mov eax, dword [0x60e0b4]
test eax, eax
jne 0x54e27b
mov eax, dword [ebp + 8]
test eax, eax
jne 0x54e034
push 6
pop eax
jmp 0x54e27b
mov ecx, dword [eax]
test ecx, ecx
jne 0x54e04f
push 6
pop ecx
mov dword [0x60e0b8], eax
mov eax, ecx
mov dword [0x60e0b4], ecx
jmp 0x54e27b
push ebx
push 0
push ecx
mov ebx, edi
call fcn.0054e283
push 0
push dword [ebp + 0xc]
mov dword [ebp - 4], eax
call fcn.0054e283
mov ecx, eax
mov dword [ebp - 0x18], ecx
cmp ecx, dword [ebp - 4]
jne 0x54e082
cmp dword [0x60e0a8], ebx
jne 0x54e249
jmp 0x54e223
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp - 4]
test eax, eax
je 0x54e08e
mov dword [eax], esi
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x54e097
mov dword [eax], ecx
push 0x18
call fcn.0054bee4
mov edi, eax
mov dword [ebp - 0x10], edi
pop ecx
test edi, edi
jne 0x54e0b0
push 8
pop esi
jmp 0x54e223
push esi
call fcn.0054dbba
mov ebx, eax
pop ecx
test ebx, ebx
je 0x54e0a8
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x54e0c6
mov dword [eax], ebx
push 8
lea eax, [ebx + 0x38]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov edi, dword [ebp - 4]
lea edx, [ebx + 0x1e]
mov eax, ebx
mov dword [ebp - 8], edx
add esp, 0xc
mov dword [ebp + 0x14], eax
mov ecx, esi
jmp 0x54e0ee
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0xc]
and dword [ebp - 0xc], 0
lea edx, [ebp - 0xc]
push edx
push 0
push ecx
mov esi, ecx
lea ecx, [ebp - 8]
push ecx
push eax
call fcn.0054ec0f
mov ecx, dword [ebp + 0x14]
mov edx, eax
mov eax, dword [ebp - 0xc]
sub eax, esi
mov dword [ebp + 0xc], edx
add eax, edx
add ecx, eax
mov eax, edx
mov dword [ebp + 0x14], ecx
sub eax, edi
sub cl, bl
mov dword [ebp + 0x18], eax
shl cl, 3
and al, 7
xor cl, al
push esi
mov byte [ebx + 0x38], cl
call fcn.0054dd2e
mov edx, dword [ebp + 0x18]
pop ecx
test eax, eax
jne 0x54e13f
cmp edx, 5
jb 0x54e0e8
mov edi, dword [ebp - 0x10]
jmp 0x54e18d
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x90
jne 0x54e1c2
and dword [ebp - 0x10], 0
lea ecx, [ebp - 0x10]
push ecx
push 0
push eax
mov esi, eax
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x14]
call fcn.0054ec0f
mov ecx, dword [ebp + 0x14]
mov edx, eax
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x10]
sub eax, esi
add eax, edx
sub edx, dword [ebp - 4]
add ecx, eax
mov dword [ebp + 0x18], edx
mov dword [ebp + 0x14], ecx
mov al, dl
sub cl, bl
and al, 7
shl cl, 3
xor cl, al
mov byte [ebx + 0x38], cl
cmp edx, 5
jb 0x54e144
mov eax, dword [ebp + 0x14]
cmp eax, dword [ebp - 8]
jbe 0x54e19b
int3
sub al, bl
mov byte [ebx + 0x36], dl
push edx
push dword [ebp - 4]
mov byte [ebx + 0x1e], al
lea eax, [ebx + 0x20]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov esi, dword [ebp + 0x18]
add esp, 0xc
cmp esi, 0x19
jbe 0x54e1d5
push 6
jmp 0x54e0aa
cmp edx, 5
jae 0x54e192
cmp dword [0x60e0a8], 0
push 9
pop esi
jne 0x54e229
jmp 0x54e223
movzx ecx, byte [ebx + 0x1e]
mov edx, dword [ebp - 4]
add ecx, ebx
mov eax, dword [ebp - 0x18]
add edx, esi
mov dword [ebx + 0x44], eax
mov dword [ebx + 0x40], edx
lea eax, [ecx + 5]
mov byte [ecx], 0xe9
sub edx, eax
lea eax, [ecx + 5]
mov dword [ecx + 1], edx
push dword [ebp - 8]
push eax
call fcn.0054ddf1
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
pop ecx
pop ecx
push eax
push 0x40
push esi
mov esi, dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x54e255
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [0x60e0b4], esi
test ebx, ebx
je 0x54e23e
push ebx
call fcn.0054dd85
mov eax, dword [ebp + 0x10]
pop ecx
test eax, eax
je 0x54e23e
and dword [eax], 0
test edi, edi
je 0x54e249
push edi
call fcn.0054cbcb
pop ecx
mov eax, dword [ebp + 8]
mov dword [0x60e0b8], eax
mov eax, esi
jmp 0x54e27a
mov eax, dword [ebp + 8]
and dword [edi + 4], 0
mov dword [edi + 8], eax
mov dword [edi + 0x10], ebx
mov dword [edi + 0xc], esi
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x14], eax
mov eax, dword [0x60e0c0]
mov dword [edi], eax
xor eax, eax
mov dword [0x60e0c0], edi
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x14