Function at 0x1000355c
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x10017040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 0x40], edx
push edi
mov edi, ebx
mov dword [ebp - 0x44], ebx
xor esi, esi
mov byte [ebp - 0xc], 0xe9
mov dword [ebp - 0xb], 0
mov word [ebp - 0x14], 0x800f
mov dword [ebp - 0x12], 0
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x48], esi
mov byte [ebp - 0x31], 0
lea edx, [ebp - 0x30]
mov ecx, edi
call fcn.10001370
test dword [ebp - 0x18], 0x1000
mov edx, eax
mov dword [ebp - 0x3c], edx
jne 0x100036fa
mov ecx, edi
mov dword [ebp - 0x38], edi
sub ecx, ebx
cmp ecx, 5
jae 0x100036c9
mov bl, byte [ebp - 0x2a]
cmp bl, 0xe8
jne 0x10003560
mov edx, dword [ebp - 0x40]
movzx ecx, byte [ebp - 0x30]
mov dword [ebp - 0x3c], 5
mov eax, dword [edx]
mov ebx, dword [edx]
sub ecx, dword [eax + 0x20]
sub ecx, dword [eax + 0x1c]
add ecx, dword [ebp - 0x20]
lea eax, [ecx - 5]
add eax, edi
mov dword [ebp - 0xb], eax
lea eax, [ebp - 0xc]
jmp 0x10003672
mov al, bl
and al, 0xfd
cmp al, 0xe9
jne 0x100035c0
movzx eax, byte [ebp - 0x30]
add eax, edi
cmp bl, 0xeb
jne 0x1000357b
movsx ecx, byte [ebp - 0x20]
add eax, ecx
jmp 0x1000357e
add eax, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x44]
cmp ebx, eax
ja 0x10003599
lea ecx, [ebx + 5]
cmp eax, ecx
jae 0x10003599
cmp esi, eax
cmovae eax, esi
mov dword [ebp - 0x48], eax
jmp 0x10003624
mov ecx, dword [ebp - 0x40]
mov edx, 5
mov dword [ebp - 0x3c], edx
mov ecx, dword [ecx]
sub eax, dword [ecx + 0x20]
sub eax, dword [ecx + 0x1c]
sub eax, 5
cmp ebx, esi
mov dword [ebp - 0xb], eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0x38], eax
setae byte [ebp - 0x31]
jmp 0x10003627
mov ch, byte [ebp - 0x29]
mov cl, bl
and cl, 0xf0
cmp cl, 0x70
je 0x100035ed
mov al, bl
and al, 0xfc
cmp al, 0xe0
je 0x100035ed
mov al, ch
and al, 0xf0
cmp al, 0x80
je 0x100035ed
and bl, 0xfe
cmp bl, 0xc2
jne 0x10003624
cmp edi, esi
setae byte [ebp - 0x31]
jmp 0x10003624
movzx edx, byte [ebp - 0x30]
add edx, edi
cmp cl, 0x70
je 0x10003605
mov al, bl
and al, 0xfc
cmp al, 0xe0
je 0x10003605
add edx, dword [ebp - 0x20]
jmp 0x1000360b
movsx eax, byte [ebp - 0x20]
add edx, eax
mov eax, dword [ebp - 0x44]
cmp eax, edx
ja 0x10003634
add eax, 5
cmp edx, eax
jae 0x10003634
cmp esi, edx
cmovae edx, esi
mov dword [ebp - 0x48], edx
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x40]
xor esi, esi
mov ebx, dword [ecx]
test edx, edx
je 0x10003697
jmp 0x10003677
mov al, bl
and al, 0xfc
cmp al, 0xe0
je 0x100036fa
cmp bl, 0xf
movzx eax, bl
movzx ecx, ch
cmovne ecx, eax
mov dword [ebp - 0x3c], 6
and cl, 0xf
or cl, 0x80
mov byte [ebp - 0x13], cl
mov ecx, dword [ebp - 0x40]
mov eax, dword [ecx]
mov ebx, dword [ecx]
sub edx, dword [eax + 0x20]
sub edx, dword [eax + 0x1c]
lea eax, [ebp - 0x14]
sub edx, 6
mov dword [ebp - 0x12], edx
xor esi, esi
mov dword [ebp - 0x38], eax
mov edi, dword [ebp - 0x3c]
nop word [eax + eax]
movzx eax, byte [esi + eax]
mov ecx, ebx
push eax
call fcn.10002150
mov eax, dword [ebp - 0x38]
inc esi
cmp esi, edi
jb 0x10003680
mov edi, dword [ebp - 0x4c]
movzx eax, byte [ebp - 0x30]
mov esi, dword [ebp - 0x48]
add edi, eax
cmp byte [ebp - 0x31], 0
mov ebx, dword [ebp - 0x44]
mov dword [ebp - 0x4c], edi
je 0x10003501
sub edi, ebx
cmp edi, 5
setae al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10011486
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x40]
push ecx
push 0xe9
push 0xeb
mov ecx, dword [eax]
push 3
push edi
call fcn.10002900
sub edi, ebx
cmp edi, 5
setae al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10011486
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10011486
mov esp, ebp
pop ebp
ret