Function at 0x40cfd0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x3c
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x18]
add ecx, dword [eax + 0x11]
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
add eax, dword [ecx + 0x15]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x1c]
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 - 0x28], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x34], 0xb6af31ce
mov edi, dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
jmp 0x40d050
mov dword [ebp - 0x34], 0xc75ca3c1
mov eax, dword [ebp - 0x34]
cmp eax, 0xafea3e40
jg 0x40d070
cmp eax, 0x945da36a
jne 0x40d050
jmp 0x40d049
cmp eax, 0x69fb1fde
jg 0x40d0c0
cmp eax, 0xb6af31cd
jg 0x40d0fa
cmp eax, 0xafea3e41
jne 0x40d050
mov eax, dword [ebp - 0x24]
inc eax
mov ecx, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [esp + 8], 0x20
call fcn.004032e0
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
test al, 1
mov eax, 0x20679285
jne 0x40d0b4
mov eax, 0x6243ed50
mov dword [ebp - 0x34], eax
jmp 0x40d050
cmp eax, 0x69fb1fdf
jne 0x40d050
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x1c]
sub eax, dword [ecx + 1]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + 0x19]
add edx, ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.0040c470
mov dword [ebp - 0x34], 0xb912cec6
jmp 0x40d050
cmp eax, 0xb912cec5
jg 0x40d124
cmp eax, 0xb6af31ce
jne 0x40d050
mov eax, 0xf329990a
cmp dword [ebp - 0xc], 0
jne 0x40d11c
mov eax, 0x2837973
mov dword [ebp - 0x34], eax
jmp 0x40d050
cmp eax, 0xbc4df75e
jg 0x40d16b
cmp eax, 0xb912cec6
jne 0x40d050
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
add eax, dword [ecx + 0x11]
mov ecx, dword [ecx + 0xd]
mov edx, dword [ebp - 0x28]
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call fcn.0040c900
test eax, eax
mov eax, 0x945da36a
js 0x40d163
mov eax, 0xe2d6326f
mov dword [ebp - 0x34], eax
jmp 0x40d050
cmp eax, 0xc75ca3c0
jg 0x40d18c
cmp eax, 0xbc4df75f
jne 0x40d050
inc dword [ebp - 0x2c]
mov dword [ebp - 0x34], 0xed7d1f3e
jmp 0x40d050
cmp eax, 0xe2d6326e
jg 0x40d1b6
cmp eax, 0xc75ca3c1
jne 0x40d050
mov eax, 0x538cbf3e
cmp dword [ebp - 0x28], 0
jne 0x40d1ae
mov eax, 0x1835469e
mov dword [ebp - 0x34], eax
jmp 0x40d050
cmp eax, 0xed7d1f3d
jg 0x40d1da
cmp eax, 0xe2d6326f
jne 0x40d050
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x34], 0x6031c7ad
jmp 0x40d050
cmp eax, 0xf3299909
jg 0x40d209
cmp eax, 0xed7d1f3e
jne 0x40d050
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x1c]
mov eax, 0x23216f92
cmp ecx, dword [edx + 0xd]
jb 0x40d201
mov eax, 0xafea3e41
mov dword [ebp - 0x34], eax
jmp 0x40d050
cmp eax, 0x2837972
jg 0x40d22e
cmp eax, 0xf329990a
jne 0x40d050
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x34], 0xed7d1f3e
jmp 0x40d050
cmp eax, 0x1835469d
jg 0x40d24e
cmp eax, 0x2837973
jne 0x40d050
mov esi, dword [edi]
mov dword [ebp - 0x34], 0xc75ca3c1
jmp 0x40d050
cmp eax, 0x20679284
jg 0x40d273
cmp eax, 0x1835469e
jne 0x40d050
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x34], 0x6031c7ad
jmp 0x40d050
cmp eax, 0x23216f91
jg 0x40d2a8
cmp eax, 0x20679285
jne 0x40d050
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
mov ecx, dword [ecx + 1]
add ecx, eax
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040c060
mov dword [ebp - 0x34], 0x6243ed50
jmp 0x40d050
cmp eax, 0x538cbf3d
jg 0x40d2f2
cmp eax, 0x23216f92
jne 0x40d050
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 5]
mov edx, dword [ebp - 0x28]
add edx, dword [eax + 1]
add eax, 0xd
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.004032e0
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 5]
lea eax, [eax + ecx + 0xd]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x34], 0xbc4df75f
jmp 0x40d050
cmp eax, 0x538cbf3e
je 0x40d321
cmp eax, 0x6243ed50
jne 0x40d34c
call fcn.0040da10
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
test al, 3
mov eax, 0x69fb1fdf
jne 0x40d319
mov eax, 0xb912cec6
mov dword [ebp - 0x34], eax
jmp 0x40d050
mov eax, dword [ebp - 0x28]
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 - 0x34], 0x1835469e
jmp 0x40d050
cmp eax, 0x6031c7ad
jne 0x40d050
mov eax, dword [ebp - 0x10]
add esp, 0x3c
pop esi
pop edi
pop ebp
ret