Function at 0x40cc30
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x40
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x1c]
add ecx, dword [eax + 0x11]
mov dword [ebp - 0x24], ecx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
add eax, dword [ecx + 0x15]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 5]
mov dword [esp + 4], eax
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0x1000
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
sub esp, 0x10
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x38], 0xfcd6d264
mov edi, dword [sym.imp.ADVAPI32.dll_BuildExplicitAccessWithNameW]
jmp 0x40ccb0
mov dword [ebp - 0x38], 0xfae921d9
mov eax, dword [ebp - 0x38]
cmp eax, 0x9be6dd39
jg 0x40ccd0
cmp eax, 0x88691ed7
jne 0x40ccb0
jmp 0x40cca9
cmp eax, 0xa623f5f4
jg 0x40ccf0
cmp eax, 0x9be6dd3a
jne 0x40ccb0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x38], 0xb96fa649
jmp 0x40ccb0
cmp eax, 0xaff69092
jg 0x40cd0a
cmp eax, 0xa623f5f5
jne 0x40ccb0
inc dword [ebp - 0x30]
mov dword [ebp - 0x38], 0x6ce13682
jmp 0x40ccb0
cmp eax, 0xb834a0e7
jg 0x40cd43
cmp eax, 0xaff69093
jne 0x40ccb0
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
call dword [sym.imp.KERNEL32.dll_VirtualFree]
sub esp, 0xc
mov dword [ebp - 0x38], 0xc79e3fdb
jmp 0x40ccb0
cmp eax, 0xb96fa648
jg 0x40cd6e
cmp eax, 0xb834a0e8
jne 0x40ccb0
mov al, byte [ebp - 9]
test al, al
mov eax, 0x29cefb59
jne 0x40cd66
mov eax, 0xba81aa5
mov dword [ebp - 0x38], eax
jmp 0x40ccb0
cmp eax, 0xc018172f
jg 0x40cd8c
cmp eax, 0xb96fa649
jne 0x40ccb0
mov dword [ebp - 0x38], 0xe48a0352
jmp 0x40ccb0
cmp eax, 0xc79e3fda
jg 0x40cdb1
cmp eax, 0xc0181730
jne 0x40ccb0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x38], 0xfae921d9
jmp 0x40ccb0
cmp eax, 0xc7f18e2c
jg 0x40cdcf
cmp eax, 0xc79e3fdb
jne 0x40ccb0
mov dword [ebp - 0x38], 0x56d36551
jmp 0x40ccb0
cmp eax, 0xcd532fc2
jg 0x40cded
cmp eax, 0xc7f18e2d
jne 0x40ccb0
mov dword [ebp - 0x38], 0x9be6dd3a
jmp 0x40ccb0
cmp eax, 0xcde25b24
jg 0x40ce0b
cmp eax, 0xcd532fc3
jne 0x40ccb0
mov dword [ebp - 0x38], 0x5e4f5d49
jmp 0x40ccb0
cmp eax, 0xceef27a8
jg 0x40ce54
cmp eax, 0xcde25b25
jne 0x40ccb0
mov eax, dword [ebp - 0x28]
inc eax
mov ecx, dword [ebp - 0x18]
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [esp + 8], 0x20
call fcn.00402dc0
mov eax, dword [ebp - 0x28]
movzx eax, byte [eax]
test al, 1
mov eax, 0x1e7290a7
jne 0x40ce4c
mov eax, 0x7414d090
mov dword [ebp - 0x38], eax
jmp 0x40ccb0
cmp eax, 0xe4768fb1
jg 0x40ce99
cmp eax, 0xceef27a9
jne 0x40ccb0
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x20]
sub eax, dword [ecx + 1]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
mov edx, dword [edx + 0x19]
add edx, ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.0040c0b0
mov dword [ebp - 0x38], 0x1692b556
jmp 0x40ccb0
cmp eax, 0x7414d08f
jg 0x40cfbf
cmp eax, 0x73fbf2fd
jg 0x40cfeb
cmp eax, 0x7214003f
jg 0x40d029
cmp eax, 0x6ffd098f
jg 0x40d040
cmp eax, 0x6ce13681
jg 0x40d076
cmp eax, 0x68748c35
jg 0x40d09e
cmp eax, 0x66f5aad5
jg 0x40d0d8
cmp eax, 0x5e4f5d48
jg 0x40d118
cmp eax, 0x56d36550
jg 0x40d13b
cmp eax, 0x4b88ee19
jg 0x40d152
cmp eax, 0x48c28b75
jg 0x40d190
cmp eax, 0x3814fc75
jg 0x40d1a7
cmp eax, 0x35acb4c1
jg 0x40d1be
cmp eax, 0x29cefb58
jg 0x40d1d5
cmp eax, 0x221a4d02
jg 0x40d1ec
cmp eax, 0x1e7290a6
jg 0x40d205
cmp eax, 0x1ae468b1
jg 0x40d233
cmp eax, 0x1692b555
jg 0x40d250
cmp eax, 0xfcf0c83
jg 0x40d267
cmp eax, 0xba81aa4
jg 0x40d27e
cmp eax, 0x697c4c6
jg 0x40d295
cmp eax, 0xfcd6d263
jg 0x40d2cb
cmp eax, 0xfae921d8
jg 0x40d2ee
cmp eax, 0xe4768fb2
je 0x40d30c
cmp eax, 0xed28ce5f
jne 0x40d344
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x38], 0x9be6dd3a
jmp 0x40ccb0
cmp eax, 0x7414d090
jne 0x40ccb0
call fcn.0040d990
mov eax, dword [ebp - 0x28]
movzx eax, byte [eax]
test al, 3
mov eax, 0x72140040
jne 0x40cfe3
mov eax, 0x66f5aad6
mov dword [ebp - 0x38], eax
jmp 0x40ccb0
cmp eax, 0x73fbf2fe
jne 0x40ccb0
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x20]
sub eax, dword [ecx + 1]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
mov edx, dword [edx + 0x19]
add edx, ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.0040c0b0
mov dword [ebp - 0x38], 0xceef27a9
jmp 0x40ccb0
cmp eax, 0x72140040
jne 0x40ccb0
mov dword [ebp - 0x38], 0x4b88ee1a
jmp 0x40ccb0
cmp eax, 0x6ffd0990
jne 0x40ccb0
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
call dword [sym.imp.KERNEL32.dll_VirtualFree]
sub esp, 0xc
mov dword [ebp - 0x38], 0x68748c36
jmp 0x40ccb0
cmp eax, 0x6ce13682
jne 0x40ccb0
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x20]
mov eax, 0xe4768fb2
cmp ecx, dword [edx + 0xd]
jb 0x40d096
mov eax, 0xcde25b25
mov dword [ebp - 0x38], eax
jmp 0x40ccb0
cmp eax, 0x68748c36
jne 0x40ccb0
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
call dword [sym.imp.KERNEL32.dll_VirtualFree]
sub esp, 0xc
mov byte [ebp - 9], 1
mov dword [ebp - 0x38], 0xb834a0e8
jmp 0x40ccb0
cmp eax, 0x66f5aad6
jne 0x40ccb0
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
add eax, dword [ecx + 0x11]
mov ecx, dword [ecx + 0xd]
mov edx, dword [ebp - 0x2c]
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call fcn.0040c600
test eax, eax
mov eax, 0xcd532fc3
js 0x40d110
mov eax, 0x1ae468b2
mov dword [ebp - 0x38], eax
jmp 0x40ccb0
cmp eax, 0x5e4f5d49
jne 0x40ccb0
mov eax, 0xfcf0c84
cmp dword [ebp - 0x2c], 0
jne 0x40d133
mov eax, 0xc7f18e2d
mov dword [ebp - 0x38], eax
jmp 0x40ccb0
cmp eax, 0x56d36551
jne 0x40ccb0
mov dword [ebp - 0x38], 0x68748c36
jmp 0x40ccb0
cmp eax, 0x4b88ee1a
jne 0x40ccb0
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x20]
sub eax, dword [ecx + 1]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
mov edx, dword [edx + 0x19]
add edx, ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.0040c0b0
mov dword [ebp - 0x38], 0x48c28b76
jmp 0x40ccb0
cmp eax, 0x48c28b76
jne 0x40ccb0
mov dword [ebp - 0x38], 0x66f5aad6
jmp 0x40ccb0
cmp eax, 0x3814fc76
jne 0x40ccb0
mov dword [ebp - 0x38], 0x6ce13682
jmp 0x40ccb0
cmp eax, 0x35acb4c2
jne 0x40ccb0
mov dword [ebp - 0x38], 0xceef27a9
jmp 0x40ccb0
cmp eax, 0x29cefb59
jne 0x40ccb0
mov dword [ebp - 0x38], 0xc7f18e2d
jmp 0x40ccb0
cmp eax, 0x221a4d03
jne 0x40ccb0
mov esi, dword [edi]
mov dword [ebp - 0x38], 0x5e4f5d49
jmp 0x40ccb0
cmp eax, 0x1e7290a7
jne 0x40ccb0
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
mov ecx, dword [ecx + 1]
add ecx, eax
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040bc70
mov dword [ebp - 0x38], 0x7414d090
jmp 0x40ccb0
cmp eax, 0x1ae468b2
jne 0x40ccb0
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x38], 0xe48a0352
jmp 0x40ccb0
cmp eax, 0x1692b556
jne 0x40ccb0
mov dword [ebp - 0x38], 0x4b88ee1a
jmp 0x40ccb0
cmp eax, 0xfcf0c84
jne 0x40ccb0
mov dword [ebp - 0x38], 0x56d36551
jmp 0x40ccb0
cmp eax, 0xba81aa5
jne 0x40ccb0
mov dword [ebp - 0x38], 0xaff69093
jmp 0x40ccb0
cmp eax, 0x697c4c7
jne 0x40ccb0
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
call dword [sym.imp.KERNEL32.dll_VirtualFree]
sub esp, 0xc
mov dword [ebp - 0x38], 0xaff69093
jmp 0x40ccb0
cmp eax, 0xfcd6d264
jne 0x40ccb0
mov eax, 0x88691ed7
cmp dword [ebp - 0x10], 0
jne 0x40d2e6
mov eax, 0x221a4d03
mov dword [ebp - 0x38], eax
jmp 0x40ccb0
cmp eax, 0xfae921d9
jne 0x40ccb0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x38], 0x3814fc76
jmp 0x40ccb0
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 5]
mov edx, dword [ebp - 0x2c]
add edx, dword [eax + 1]
add eax, 0xd
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.00402dc0
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 5]
lea eax, [eax + ecx + 0xd]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x38], 0xa623f5f5
jmp 0x40ccb0
cmp eax, 0xe48a0352
jne 0x40ccb0
mov eax, dword [ebp - 0x14]
add esp, 0x40
pop esi
pop edi
pop ebp
ret