Function at 0x10055820
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 0x1005583a
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov esi, dword [esp + 0x10]
test byte [esi + 4], 0x40
jne 0x10055853
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]
mov dword [edi + 0x18], 0
cdq
and edx, 7
mov dword [edi + 0x14], ecx
add eax, edx
sar eax, 3
mov dword [edi + 4], eax
mov eax, dword [edi + 8]
test eax, eax
jne 0x100558b0
mov dword [edi + 0x18], 0xff000000
mov ecx, dword [edi + 0xc]
test ecx, ecx
jne 0x100558be
or dword [edi + 0x18], 0xff0000
mov ecx, dword [edi + 0x10]
test ecx, ecx
jne 0x100558ce
mov ecx, dword [edi + 0x18]
or ch, 0xff
mov dword [edi + 0x18], ecx
mov ecx, dword [edi + 0x14]
test ecx, ecx
jne 0x100558de
mov ecx, dword [edi + 0x18]
or cl, 0xff
mov dword [edi + 0x18], ecx
push ebx
push ebp
test eax, eax
mov cl, 8
mov byte [edi + 0x1d], 0
je 0x10055912
test al, 1
jne 0x100558fc
mov bl, byte [edi + 0x1d]
shr eax, 1
inc bl
test al, 1
mov byte [edi + 0x1d], bl
je 0x100558ee
test al, 1
mov byte [edi + 0x1c], cl
je 0x10055916
mov dl, cl
shr eax, 1
dec dl
test al, 1
jne 0x10055905
mov byte [edi + 0x1c], dl
jmp 0x10055916
mov byte [edi + 0x1c], 0
mov bl, byte [edi + 0x1c]
mov eax, dword [edi + 0xc]
add bl, 0x18
mov byte [edi + 0x1c], bl
mov byte [edi + 0x1f], 0
test eax, eax
je 0x10055952
test al, 1
jne 0x1005593c
mov bl, byte [edi + 0x1f]
shr eax, 1
inc bl
test al, 1
mov byte [edi + 0x1f], bl
je 0x1005592e
test al, 1
mov byte [edi + 0x1e], cl
je 0x10055956
mov dl, cl
shr eax, 1
dec dl
test al, 1
jne 0x10055945
mov byte [edi + 0x1e], dl
jmp 0x10055956
mov byte [edi + 0x1e], 0
mov bl, byte [edi + 0x1e]
mov eax, dword [edi + 0x10]
add bl, 0x10
mov byte [edi + 0x1e], bl
mov byte [edi + 0x21], 0
test eax, eax
je 0x10055992
test al, 1
jne 0x1005597c
mov bl, byte [edi + 0x21]
shr eax, 1
inc bl
test al, 1
mov byte [edi + 0x21], bl
je 0x1005596e
test al, 1
mov byte [edi + 0x20], cl
je 0x10055996
mov dl, cl
shr eax, 1
dec dl
test al, 1
jne 0x10055985
mov byte [edi + 0x20], dl
jmp 0x10055996
mov byte [edi + 0x20], 0
mov bl, byte [edi + 0x20]
mov eax, dword [edi + 0x14]
add bl, cl
mov byte [edi + 0x20], bl
mov byte [edi + 0x23], 0
test eax, eax
je 0x100559cf
test al, 1
jne 0x100559bb
mov bl, byte [edi + 0x23]
shr eax, 1
inc bl
test al, 1
mov byte [edi + 0x23], bl
je 0x100559ad
test al, 1
mov byte [edi + 0x22], cl
je 0x100559d3
shr eax, 1
dec cl
test al, 1
jne 0x100559c2
mov byte [edi + 0x22], cl
jmp 0x100559d3
mov byte [edi + 0x22], 0
mov ebx, dword [edi + 0x14]
mov edx, dword [edi + 0x30]
mov ecx, dword [edi + 0x10]
mov ebp, dword [edi + 0xc]
mov eax, dword [edi + 0x2c]
mov esi, dword [edi + 8]
push ebx
mov dword [edi + 0x28], edx
mov edx, dword [edi]
push ecx
mov dword [esp + 0x18], ecx
push ebp
mov dword [edi + 0x24], eax
push esi
mov ecx, 0x10116e30
mov dword [esp + 0x28], edx
mov dword [0x10116e30], eax
mov dword [0x10116e34], 0
call fcn.100560a0
push 0x53
mov ecx, 0x10116e30
call fcn.10055c30
push 0x55
mov ecx, 0x10116e30
call fcn.10055c30
push 2
push 0
mov ecx, 0x10116e30
call fcn.10055cc0
push 1
push 5
mov ecx, 0x10116e30
call fcn.10055cc0
cmp ebp, 0xff0000
jne 0x10055a8b
cmp dword [esp + 0x10], 0xff00
jne 0x10055a8b
cmp ebx, 0xff
jne 0x10055a8b
test esi, esi
mov esi, dword [esp + 0x18]
jne 0x10055b7d
cmp esi, 0x18
jle 0x10055b7d
push 0xffffff
push 0
mov ecx, 0x10116e30
call fcn.10055ff0
jmp 0x10055b7d
push 0
push 3
mov ecx, 0x10116e30
call fcn.10055cc0
mov eax, dword [0x10116e44]
mov ecx, 0x10116e30
add eax, 0xfffffff9
push eax
push 0
call fcn.10055f60
push 3
push 1
mov ecx, 0x10116e30
call fcn.10055cc0
mov ecx, dword [0x10116e40]
add ecx, 0xfffffff1
push ecx
push 3
mov ecx, 0x10116e30
call fcn.10055f60
test esi, esi
je 0x10055afa
push 1
push 2
mov ecx, 0x10116e30
call fcn.10055cc0
mov edx, dword [0x10116e38]
mov ecx, 0x10116e30
add edx, 0xffffffe1
push edx
push 2
call fcn.10055f60
push ebx
push 0
mov ecx, 0x10116e30
call fcn.10055ff0
mov eax, dword [0x10116e3c]
mov ecx, 0x10116e30
add eax, 0xffffffe9
push eax
push 1
call fcn.10055f60
test esi, esi
je 0x10055b2d
push esi
push 2
mov ecx, 0x10116e30
call fcn.10055ff0
mov ecx, dword [esp + 0x10]
push ecx
push 3
mov ecx, 0x10116e30
call fcn.10055ff0
test esi, esi
je 0x10055b50
push 2
push 0
mov ecx, 0x10116e30
call fcn.10055d10
push ebp
push 1
mov ecx, 0x10116e30
call fcn.10055ff0
push 3
push 0
mov ecx, 0x10116e30
call fcn.10055d10
push 1
push 0
mov ecx, 0x10116e30
call fcn.10055d10
mov esi, dword [esp + 0x18]
pop ebp
cmp esi, 0x10
pop ebx
je 0x10055bcb
cmp esi, 0x18
je 0x10055ba7
push 0
cmp esi, 0x20
push 0
push 5
mov ecx, 0x10116e30
je 0x10055ba0
call fcn.10055ed0
jmp 0x10055bdb
call fcn.10055d60
jmp 0x10055bdb
push 0
push 0
push 5
mov ecx, 0x10116e30
call fcn.10055ed0
push 0xfffffffffffffff8
push 0
mov ecx, 0x10116e30
call fcn.10055f60
push 0
push 1
jmp 0x10055bcf
push 0
push 0
push 5
mov ecx, 0x10116e30
call fcn.10055e10
push 0x5d
mov ecx, 0x10116e30
call fcn.10055c30
push 0x5b
mov ecx, 0x10116e30
call fcn.10055c30
push 0
mov ecx, 0x10116e30
call fcn.10055c60
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, 0x10116e30
call fcn.10056120
pop edi
pop esi
pop ecx
ret 4