Function at 0x10054ed0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ecx
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0x2c]
test eax, eax
je 0x10054eea
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov esi, dword [esp + 0x10]
test byte [esi + 4], 0x40
jne 0x10054f03
mov ecx, 0xd
xor eax, eax
rep stosd dword es:[edi], eax
pop edi
pop esi
pop ecx
ret 4
push 0x40
push 0x3000
push 0x80
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [edi + 0x2c], eax
add eax, 0x40
mov dword [edi + 0x30], eax
mov eax, dword [esi + 0xc]
mov dword [edi], eax
mov ecx, dword [esi + 0x1c]
mov dword [edi + 8], ecx
mov edx, dword [esi + 0x10]
mov dword [edi + 0xc], edx
mov eax, dword [esi + 0x14]
mov dword [edi + 0x10], eax
mov eax, dword [edi]
mov ecx, dword [esi + 0x18]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [edi + 4], eax
mov eax, dword [edi + 8]
test eax, eax
mov dword [edi + 0x14], ecx
mov dword [edi + 0x18], 0
jne 0x10054f60
mov dword [edi + 0x18], 0xff000000
mov ecx, dword [edi + 0xc]
test ecx, ecx
jne 0x10054f6e
or dword [edi + 0x18], 0xff0000
mov ecx, dword [edi + 0x10]
test ecx, ecx
jne 0x10054f7c
or dword [edi + 0x18], 0xff00
mov ecx, dword [edi + 0x14]
test ecx, ecx
jne 0x10054f8a
or dword [edi + 0x18], 0xff
test eax, eax
push ebx
push ebp
mov cl, 8
mov byte [edi + 0x1d], 0
je 0x10054fbe
test al, 1
jne 0x10054fa8
mov bl, byte [edi + 0x1d]
inc bl
shr eax, 1
test al, 1
mov byte [edi + 0x1d], bl
je 0x10054f9a
test al, 1
mov byte [edi + 0x1c], cl
je 0x10054fc2
mov dl, cl
shr eax, 1
dec dl
test al, 1
jne 0x10054fb1
mov byte [edi + 0x1c], dl
jmp 0x10054fc2
mov byte [edi + 0x1c], 0
mov bl, byte [edi + 0x1c]
mov eax, dword [edi + 0xc]
add bl, 0x18
test eax, eax
mov byte [edi + 0x1c], bl
mov byte [edi + 0x1f], 0
je 0x10054ffe
test al, 1
jne 0x10054fe8
mov bl, byte [edi + 0x1f]
inc bl
shr eax, 1
test al, 1
mov byte [edi + 0x1f], bl
je 0x10054fda
test al, 1
mov byte [edi + 0x1e], cl
je 0x10055002
mov dl, cl
shr eax, 1
dec dl
test al, 1
jne 0x10054ff1
mov byte [edi + 0x1e], dl
jmp 0x10055002
mov byte [edi + 0x1e], 0
mov bl, byte [edi + 0x1e]
mov eax, dword [edi + 0x10]
add bl, 0x10
test eax, eax
mov byte [edi + 0x1e], bl
mov byte [edi + 0x21], 0
je 0x1005503e
test al, 1
jne 0x10055028
mov bl, byte [edi + 0x21]
inc bl
shr eax, 1
test al, 1
mov byte [edi + 0x21], bl
je 0x1005501a
test al, 1
mov byte [edi + 0x20], cl
je 0x10055042
mov dl, cl
shr eax, 1
dec dl
test al, 1
jne 0x10055031
mov byte [edi + 0x20], dl
jmp 0x10055042
mov byte [edi + 0x20], 0
mov bl, byte [edi + 0x20]
mov eax, dword [edi + 0x14]
add bl, cl
test eax, eax
mov byte [edi + 0x20], bl
mov byte [edi + 0x23], 0
je 0x1005507b
test al, 1
jne 0x10055067
mov bl, byte [edi + 0x23]
inc bl
shr eax, 1
test al, 1
mov byte [edi + 0x23], bl
je 0x10055059
test al, 1
mov byte [edi + 0x22], cl
je 0x1005507f
shr eax, 1
dec cl
test al, 1
jne 0x1005506e
mov byte [edi + 0x22], cl
jmp 0x1005507f
mov byte [edi + 0x22], 0
mov ebx, dword [edi + 0x14]
mov ecx, dword [edi + 0x10]
mov edx, dword [edi + 0x30]
mov ebp, dword [edi + 0xc]
mov eax, dword [edi + 0x2c]
mov esi, dword [edi + 8]
push ebx
push ecx
mov dword [edi + 0x28], edx
mov edx, dword [edi]
push ebp
mov dword [edi + 0x24], eax
mov dword [esp + 0x1c], ecx
push esi
mov ecx, 0x10132618
mov dword [esp + 0x28], edx
mov dword [0x10132618], eax
mov dword [0x1013261c], 0
call fcn.10055740
push 0x53
mov ecx, 0x10132618
call fcn.100552e0
push 0x55
mov ecx, 0x10132618
call fcn.100552e0
push 2
push 0
mov ecx, 0x10132618
call fcn.10055360
push 1
push 5
mov ecx, 0x10132618
call fcn.10055360
cmp ebp, 0xff0000
jne 0x10055137
cmp dword [esp + 0x10], 0xff00
jne 0x10055137
cmp ebx, 0xff
jne 0x10055137
test esi, esi
mov esi, dword [esp + 0x18]
jne 0x10055229
cmp esi, 0x18
jle 0x10055229
push 0xffffff
push 0
mov ecx, 0x10132618
call fcn.10055690
jmp 0x10055229
push 0
push 3
mov ecx, 0x10132618
call fcn.10055360
mov eax, dword [0x1013262c]
add eax, 0xfffffff9
push eax
push 0
mov ecx, 0x10132618
call fcn.10055600
push 3
push 1
mov ecx, 0x10132618
call fcn.10055360
mov ecx, dword [0x10132628]
add ecx, 0xfffffff1
push ecx
push 3
mov ecx, 0x10132618
call fcn.10055600
test esi, esi
je 0x100551a6
push 1
push 2
mov ecx, 0x10132618
call fcn.10055360
mov edx, dword [0x10132620]
add edx, 0xffffffe1
push edx
push 2
mov ecx, 0x10132618
call fcn.10055600
push ebx
push 0
mov ecx, 0x10132618
call fcn.10055690
mov eax, dword [0x10132624]
add eax, 0xffffffe9
push eax
push 1
mov ecx, 0x10132618
call fcn.10055600
test esi, esi
je 0x100551d9
push esi
push 2
mov ecx, 0x10132618
call fcn.10055690
mov ecx, dword [esp + 0x10]
push ecx
push 3
mov ecx, 0x10132618
call fcn.10055690
test esi, esi
je 0x100551fc
push 2
push 0
mov ecx, 0x10132618
call fcn.100553b0
push ebp
push 1
mov ecx, 0x10132618
call fcn.10055690
push 3
push 0
mov ecx, 0x10132618
call fcn.100553b0
push 1
push 0
mov ecx, 0x10132618
call fcn.100553b0
mov esi, dword [esp + 0x18]
cmp esi, 0x10
pop ebp
pop ebx
je 0x10055277
cmp esi, 0x18
je 0x10055253
cmp esi, 0x20
push 0
push 0
push 5
mov ecx, 0x10132618
je 0x1005524c
call fcn.10055570
jmp 0x10055287
call fcn.10055400
jmp 0x10055287
push 0
push 0
push 5
mov ecx, 0x10132618
call fcn.10055570
push 0xfffffffffffffff8
push 0
mov ecx, 0x10132618
call fcn.10055600
push 0
push 1
jmp 0x1005527b
push 0
push 0
push 5
mov ecx, 0x10132618
call fcn.100554b0
push 0x5d
mov ecx, 0x10132618
call fcn.100552e0
push 0x5b
mov ecx, 0x10132618
call fcn.100552e0
push 0
mov ecx, 0x10132618
call fcn.10055300
mov edx, dword [edi + 0x14]
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0xc]
push edx
mov edx, dword [edi + 8]
push eax
mov eax, dword [edi]
push ecx
mov ecx, dword [edi + 0x30]
push edx
push eax
push ecx
mov ecx, 0x10132618
call fcn.100557c0
pop edi
pop esi
pop ecx
ret 4