Function at 0x10003cae
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov eax, dword [edx]
test eax, eax
je 0x1000412b
mov edx, dword fs:[0x30]
mov edx, dword [edx + 0x40]
add edx, 4
mov dword [esp + 4], edx
mov ecx, dword [esp + 8]
mov ecx, dword [ecx + 8]
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 8]
mov edx, dword [edx + 4]
mov dword [esp + 0x14], edx
sub esp, 8
push eax
push dword [esp + 0x18]
call sub.KERNEL32.dll_GetProcAddress
mov dword [esp + 0x30], eax
add esp, 8
test eax, eax
je 0x100040fb
cmp dword [0x100073c0], 0
je 0x10003de1
cmp eax, 0x7fffffff
jbe 0x10003de1
mov edx, dword [0x100073e0]
add edx, 0x40
cmp dword [edx], 0xc8c70ff0
je 0x10003d8c
mov dword [esp + 0x2c], 0xc8c70ff0
push 0x40
push 0x8001000
push 0x1000
push 0
call sub.KERNEL32.dll_VirtualAlloc
mov dword [esp + 0x30], eax
mov ecx, 0x26
mov edx, 0x10005600
call fcn.10001011
mov eax, dword [esp + 0x30]
lea edx, [eax + 0x28]
mov dword [eax + 0x15], edx
mov dword [esp + 0x34], edx
sub esp, 4
push 0xc
lea eax, [esp + 0x34]
push eax
mov eax, dword [0x100073e0]
add eax, 0x40
push eax
call fcn.10004c50
add esp, 4
jmp 0x10003d9a
mov eax, dword [edx + 4]
mov dword [esp + 0x30], eax
mov eax, dword [edx + 8]
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x18], ecx
mov eax, dword [ecx]
test eax, eax
je 0x1000410f
mov edx, dword [esp + 0x28]
add edx, 5
cmp eax, edx
jne 0x10003dcd
jmp 0x10003dbd
cmp eax, edx
jne 0x10003dcd
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], eax
jmp 0x1000408a
add dword [esp + 0x18], 8
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
test eax, eax
jne 0x10003db9
jmp 0x1000410f
mov eax, 0x1000
mov dword [esp + 0x24], 0
push 4
push eax
push 0x1000
push 0
call sub.KERNEL32.dll_VirtualAlloc
mov dword [esp + 0x1c], eax
mov esi, dword [esp + 0x28]
mov edi, eax
mov dword [esp + 0x20], 0
mov ebx, esi
mov edx, 0
mov cl, byte [ebx]
inc ebx
movzx eax, cl
or edx, dword [eax*4 + 0x10006400]
test dh, 0x20
je 0x10003e3a
movzx eax, byte [ebx]
test al, 0x38
jne 0x10004121
mov edx, 0x1800
jmp 0x10003e4c
test dh, 0x40
je 0x10003e4c
mov cl, byte [ebx]
inc ebx
movzx eax, cl
mov edx, dword [eax*4 + 0x10006800]
cmp edx, 0xffffffff
jne 0x10003e5b
mov ebx, 0xffffffff
jmp 0x10003f3b
test dl, 1
je 0x10003e65
and edx, 0xfffffffe
jmp 0x10003e16
mov ebp, ebx
test dh, 0x10
je 0x10003e79
test cl, 1
je 0x10003e76
or edx, 8
jmp 0x10003e79
or edx, 0x10
test dh, 8
je 0x10003ede
mov al, byte [ebp]
lea ebx, [ebp + 1]
mov cl, al
and ecx, 0xffffffc0
cmp cl, 0xc0
je 0x10003ede
and eax, 7
test dl, 4
je 0x10003eb7
test cl, cl
jne 0x10003ea3
cmp al, 6
jne 0x10003ea3
or dh, 2
jmp 0x10003ede
cmp cl, 0x40
jne 0x10003ead
or dh, 1
jmp 0x10003ede
cmp cl, 0x80
jne 0x10003ede
or dh, 2
jmp 0x10003ede
cmp cl, 0x40
jne 0x10003ec1
or dh, 1
jmp 0x10003ec9
cmp cl, 0x80
jne 0x10003ec9
or dh, 4
cmp al, 4
jne 0x10003ed3
mov al, byte [ebx]
and eax, 7
inc ebx
cmp al, 5
jne 0x10003ede
test cl, cl
jne 0x10003ede
or dh, 4
test dl, dl
jns 0x10003eef
test dl, 4
je 0x10003eec
or dh, 2
jmp 0x10003eef
or dh, 4
test dl, 8
je 0x10003f01
test dl, 2
je 0x10003efe
or edx, 0x20
jmp 0x10003f01
or edx, 0x40
mov eax, edx
and eax, 0x100
cmp eax, 1
sbb ebx, 0xffffffff
test dh, 2
je 0x10003f16
add ebx, 2
test dh, 4
je 0x10003f1e
add ebx, 4
mov eax, edx
and eax, 0x10
cmp eax, 1
sbb ebx, 0xffffffff
test dl, 0x20
je 0x10003f31
add ebx, 2
test dl, 0x40
je 0x10003f39
add ebx, 4
sub ebx, esi
add dword [esp + 0x20], ebx
mov dl, byte [esi]
mov eax, edx
and eax, 0xfe
cmp eax, 0xe8
jne 0x10003f60
mov byte [edi], dl
mov eax, esi
add eax, dword [esi + 1]
sub eax, edi
mov dword [edi + 1], eax
add edi, 5
jmp 0x10003fd8
cmp dl, 0xeb
jne 0x10003f7c
mov byte [edi], 0xe9
movsx edx, byte [esi + 1]
mov eax, esi
sub eax, edi
lea eax, [eax + edx - 3]
mov dword [edi + 1], eax
add edi, 5
jmp 0x10003fd8
cmp dl, 0xf
jne 0x10003fa0
mov al, byte [esi + 1]
shr al, 4
cmp al, 8
jne 0x10003fa0
mov ax, word [esi]
mov word [edi], ax
mov eax, esi
add eax, dword [esi + 2]
sub eax, edi
mov dword [edi + 2], eax
add edi, 6
jmp 0x10003fd8
mov al, dl
shr al, 4
cmp al, 7
jne 0x10003fcb
mov byte [edi], 0xf
mov al, byte [esi]
and eax, 0xf
or eax, 0xffffff80
mov byte [edi + 1], al
movsx edx, byte [esi + 1]
mov eax, esi
sub eax, edi
lea eax, [eax + edx - 4]
mov dword [edi + 2], eax
add edi, 6
jmp 0x10003fd8
mov ecx, ebx
mov edx, esi
mov eax, edi
call fcn.10001011
add edi, ebx
cmp dword [esp + 0x20], 4
ja 0x10003fe6
add esi, ebx
jmp 0x10003e0f
mov byte [edi], 0xe9
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
lea eax, [edx + ecx - 5]
sub eax, edi
mov dword [edi + 1], eax
lea eax, [esp + 0x38]
push eax
push 0x20
push 0x1000
push dword [esp + 0x28]
call sub.KERNEL32.dll_VirtualProtect
cmp dword [esp + 0x24], 0
jne 0x10004051
lea edx, [esp + 0x38]
push edx
push 0x40
push 5
push dword [esp + 0x34]
call sub.KERNEL32.dll_VirtualProtect
mov ecx, dword [esp + 0x28]
mov byte [ecx], 0xe9
mov eax, dword [esp + 0x14]
sub eax, ecx
sub eax, 5
mov dword [ecx + 1], eax
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x3c]
push 5
push ecx
call sub.KERNEL32.dll_VirtualProtect
jmp 0x100040f1
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
add edx, 5
mov ecx, dword [esp + 0x18]
mov dword [ecx], edx
sub eax, edx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x1c]
mov dword [ecx + 4], eax
mov byte [esp + 0x2f], 0xe8
sub esp, 4
push 5
lea eax, [esp + 0x37]
push eax
push dword [esp + 0x34]
call fcn.10004c50
add esp, 4
mov edx, dword [esp + 4]
mov edx, dword [edx]
mov dword [esp + 0x18], edx
test edx, edx
je 0x100040c0
mov eax, dword [edx]
test eax, eax
je 0x100040dd
mov edx, dword [esp + 0x28]
add edx, 5
cmp eax, edx
jne 0x100040af
jmp 0x100040dd
cmp eax, edx
je 0x100040dd
add dword [esp + 0x18], 8
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
test eax, eax
jne 0x100040ab
jmp 0x100040dd
push 4
push 0x1000
push 0x1000
push 0
call sub.KERNEL32.dll_VirtualAlloc
mov dword [esp + 0x18], eax
mov edx, dword [esp + 4]
mov dword [edx], eax
mov eax, dword [esp + 0x28]
add eax, 5
mov ecx, dword [esp + 0x18]
mov dword [ecx], eax
mov eax, dword [esp + 0x14]
mov dword [ecx + 4], eax
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
mov dword [edx], ecx
add dword [esp + 8], 0xc
mov edx, dword [esp + 8]
mov eax, dword [edx]
test eax, eax
je 0x1000412b
jmp 0x10003cd8
mov eax, 0x8001000
mov dword [esp + 0x24], 1
jmp 0x10003dee
mov edx, 0x800
jmp 0x10003e4c
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret