Function at 0x409940
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], 0x1671bb92
mov edi, dword [sym.imp.ADVAPI32.dll_BuildSecurityDescriptorA]
jmp 0x4099e0
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], 0x704e7430
nop
mov eax, dword [ebp - 0x34]
cmp eax, 0x7ab3e158
jg 0x409a10
cmp eax, 0x85cd9a4b
jg 0x409a20
cmp eax, 0x82544d61
jne 0x4099e0
mov eax, 0x7ab3e159
cmp dword [ebp - 0x28], 0
jne 0x409a08
mov eax, 0x704e7430
mov dword [ebp - 0x34], eax
jmp 0x4099e0
cmp eax, 0x7ab3e159
jne 0x4099e0
jmp 0x4099b9
cmp eax, 0x8a1ba86c
jg 0x409a66
cmp eax, 0x85cd9a4c
jne 0x4099e0
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.00402940
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 5]
lea eax, [eax + ecx + 0xd]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x34], 0x8a1ba86d
jmp 0x4099e0
cmp eax, 0xaf37e4cf
jg 0x409a87
cmp eax, 0x8a1ba86d
jne 0x4099e0
inc dword [ebp - 0x2c]
mov dword [ebp - 0x34], 0x65cc5d86
jmp 0x4099e0
cmp eax, 0xc899eb5c
jg 0x409aa7
cmp eax, 0xaf37e4d0
jne 0x4099e0
mov esi, dword [edi]
mov dword [ebp - 0x34], 0x3c5409f3
jmp 0x4099e0
cmp eax, 0x712fcbcc
jg 0x409af6
cmp eax, 0x704e742f
jg 0x409b14
cmp eax, 0x696efaca
jg 0x409b32
cmp eax, 0x65cc5d85
jg 0x409b49
cmp eax, 0x5d9d990c
jg 0x409b71
cmp eax, 0xc9692d18
jg 0x409b88
cmp eax, 0xc899eb5d
jne 0x4099e0
mov esi, dword [edi]
mov dword [ebp - 0x34], 0xaf37e4d0
jmp 0x4099e0
cmp eax, 0x712fcbcd
jne 0x4099e0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x34], 0x65cc5d86
jmp 0x4099e0
cmp eax, 0x704e7430
jne 0x4099e0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x34], 0xf65a1478
jmp 0x4099e0
cmp eax, 0x696efacb
jne 0x4099e0
mov dword [ebp - 0x34], 0x82544d61
jmp 0x4099e0
cmp eax, 0x65cc5d86
jne 0x4099e0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x1c]
mov eax, 0x85cd9a4c
cmp ecx, dword [edx + 0xd]
jb 0x409b69
mov eax, 0xee568796
mov dword [ebp - 0x34], eax
jmp 0x4099e0
cmp eax, 0x5d9d990d
jne 0x4099e0
mov dword [ebp - 0x34], 0xaf37e4d0
jmp 0x4099e0
cmp eax, 0xee568795
jg 0x409bd9
cmp eax, 0xc9692d19
jne 0x4099e0
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x1c]
mov edx, 0xe935e184
sub edx, dword [ecx + 1]
lea eax, [edx + eax + 0x16ca1e7c]
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.00408f00
mov dword [ebp - 0x34], 0x3c49a81d
jmp 0x4099e0
cmp eax, 0xf65a1477
jg 0x409c3b
cmp eax, 0xee568796
jne 0x4099e0
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.00402940
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
mov ecx, eax
not ecx
mov edx, ecx
and edx, 0x90
and eax, 0x6f
add eax, edx
xor eax, 0x91
or eax, ecx
cmp eax, 0xffffffff
mov eax, 0xfa06d6bc
jne 0x409c33
mov eax, 0x2c969613
mov dword [ebp - 0x34], eax
jmp 0x4099e0
cmp eax, 0xfa06d6bb
jg 0x409c52
cmp eax, 0xf65a1478
jne 0x4099e0
jmp 0x409d5e
cmp eax, 0xfc776920
jg 0x409c87
cmp eax, 0xfa06d6bc
jne 0x4099e0
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.00408a70
mov dword [ebp - 0x34], 0x2c969613
jmp 0x4099e0
cmp eax, 0x1671bb91
jg 0x409cab
cmp eax, 0xfc776921
jne 0x4099e0
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x34], 0xf65a1478
jmp 0x4099e0
cmp eax, 0x2c969612
jg 0x409cd5
cmp eax, 0x1671bb92
jne 0x4099e0
mov eax, 0x712fcbcd
cmp dword [ebp - 0xc], 0
jne 0x409ccd
mov eax, 0x5d9d990d
mov dword [ebp - 0x34], eax
jmp 0x4099e0
cmp eax, 0x2c969613
je 0x409d18
cmp eax, 0x3c49a81d
jne 0x409d47
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.004093b0
test eax, eax
mov eax, 0x696efacb
js 0x409d10
mov eax, 0xfc776921
mov dword [ebp - 0x34], eax
jmp 0x4099e0
call fcn.0040be00
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
mov ecx, eax
not ecx
and ecx, 0xfffffffc
xor eax, 3
or eax, ecx
not eax
test eax, eax
mov eax, 0xc9692d19
jne 0x409d3f
mov eax, 0x3c49a81d
mov dword [ebp - 0x34], eax
jmp 0x4099e0
cmp eax, 0x3c5409f3
jne 0x4099e0
mov dword [ebp - 0x34], 0x82544d61
jmp 0x4099e0
mov eax, dword [ebp - 0x10]
add esp, 0x3c
pop esi
pop edi
pop ebp
ret