Function at 0x40cfb0
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], 0xefee8952
mov edi, dword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
jmp 0x40d030
mov dword [ebp - 0x38], eax
nop
nop
nop
nop
mov eax, dword [ebp - 0x38]
cmp eax, 0x7564a2d4
jg 0x40d080
cmp eax, 0x59ecb389
jg 0x40d0b0
cmp eax, 0x511e0ff2
jg 0x40d0c7
cmp eax, 0x44014aab
jg 0x40d0e1
cmp eax, 0x29c4e88c
jg 0x40d11d
cmp eax, 0x93265b3d
jg 0x40d134
cmp eax, 0x8ef8c514
jne 0x40d030
mov esi, dword [edi]
mov dword [ebp - 0x38], 0x24ec7365
jmp 0x40d030
cmp eax, 0x7564a2d5
jne 0x40d030
call fcn.0040dcd0
mov eax, dword [ebp - 0x28]
movzx eax, byte [eax]
not eax
or eax, 0xfffffffc
cmp eax, 0xffffffff
mov eax, 0xa5381f89
jne 0x40d029
mov eax, 0xa885c23f
jmp 0x40d029
cmp eax, 0x59ecb38a
jne 0x40d030
mov dword [ebp - 0x38], 0x93265b3e
jmp 0x40d030
cmp eax, 0x511e0ff3
jne 0x40d030
inc dword [ebp - 0x30]
mov dword [ebp - 0x38], 0x29c4e88d
jmp 0x40d030
cmp eax, 0x44014aac
jne 0x40d030
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.0040c9b0
test eax, eax
sets byte [ebp - 0xa]
mov dword [ebp - 0x38], 0xa7d45f29
jmp 0x40d030
cmp eax, 0x29c4e88d
jne 0x40d030
mov dword [ebp - 0x38], 0xc87171ec
jmp 0x40d030
cmp eax, 0xa5381f88
jg 0x40d15a
cmp eax, 0x93265b3e
jne 0x40d030
cmp dword [ebp - 0x2c], 0
setne byte [ebp - 9]
mov dword [ebp - 0x38], 0xcb1aefd1
jmp 0x40d030
cmp eax, 0x24ec7364
jg 0x40d1e6
cmp eax, 0x221722d7
jg 0x40d1fd
cmp eax, 0x1853340d
jg 0x40d221
cmp eax, 0x111bffc5
jg 0x40d257
cmp eax, 0xfb257a25
jg 0x40d28d
cmp eax, 0xa7d45f28
jg 0x40d2d0
cmp eax, 0xa5381f89
jne 0x40d030
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x20]
mov edx, 0x56eeafe8
sub edx, dword [ecx + 1]
lea eax, [edx + eax - 0x56eeafe8]
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.0040c450
mov dword [ebp - 0x38], 0xa885c23f
jmp 0x40d030
cmp eax, 0x24ec7365
jne 0x40d030
mov dword [ebp - 0x38], 0x93265b3e
jmp 0x40d030
cmp eax, 0x221722d8
jne 0x40d030
mov al, byte [ebp - 0xb]
test al, al
mov eax, 0xfb257a26
jne 0x40d219
mov eax, 0xa98d2ce5
mov dword [ebp - 0x38], eax
jmp 0x40d030
cmp eax, 0x1853340e
jne 0x40d030
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], 0xea2c41b3
jmp 0x40d030
cmp eax, 0x111bffc6
jne 0x40d030
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.0040c9b0
mov dword [ebp - 0x38], 0x44014aac
jmp 0x40d030
cmp eax, 0xfb257a26
jne 0x40d030
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.00402a90
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 5]
lea eax, [eax + ecx + 0xd]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x38], 0x511e0ff3
jmp 0x40d030
cmp eax, 0xf3afcb6c
jg 0x40d360
cmp eax, 0xf2e1597d
jg 0x40d370
cmp eax, 0xefee8951
jg 0x40d387
cmp eax, 0xea2c41b2
jg 0x40d3aa
cmp eax, 0xe2255a44
jg 0x40d3c8
cmp eax, 0xd198e298
jg 0x40d3e5
cmp eax, 0xcb1aefd0
jg 0x40d403
cmp eax, 0xc87171eb
jg 0x40d427
cmp eax, 0xaef76f04
jg 0x40d44d
cmp eax, 0xa98d2ce4
jg 0x40d47b
cmp eax, 0xa7d45f29
je 0x40d4c3
cmp eax, 0xa885c23f
jne 0x40d4dc
mov dword [ebp - 0x38], 0x44014aac
jmp 0x40d030
cmp eax, 0xf3afcb6d
jne 0x40d030
jmp 0x40d4f3
cmp eax, 0xf2e1597e
jne 0x40d030
mov dword [ebp - 0x38], 0x24ec7365
jmp 0x40d030
cmp eax, 0xefee8952
jne 0x40d030
mov eax, 0xd198e299
cmp dword [ebp - 0x10], 0
jne 0x40d3a2
mov eax, 0x8ef8c514
mov dword [ebp - 0x38], eax
jmp 0x40d030
cmp eax, 0xea2c41b3
jne 0x40d030
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x38], 0xf3afcb6d
jmp 0x40d030
cmp eax, 0xe2255a45
jne 0x40d030
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x38], 0xf3afcb6d
jmp 0x40d030
cmp eax, 0xd198e299
jne 0x40d030
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x38], 0x29c4e88d
jmp 0x40d030
cmp eax, 0xcb1aefd1
jne 0x40d030
mov al, byte [ebp - 9]
test al, al
mov eax, 0x1853340e
jne 0x40d41f
mov eax, 0xea2c41b3
mov dword [ebp - 0x38], eax
jmp 0x40d030
cmp eax, 0xc87171ec
jne 0x40d030
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x20]
cmp eax, dword [ecx + 0xd]
setb al
mov byte [ebp - 0xb], al
mov dword [ebp - 0x38], 0x221722d8
jmp 0x40d030
cmp eax, 0xaef76f05
jne 0x40d030
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.0040bc50
mov dword [ebp - 0x38], 0x7564a2d5
jmp 0x40d030
cmp eax, 0xa98d2ce5
jne 0x40d030
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.00402a90
mov eax, dword [ebp - 0x28]
movzx eax, byte [eax]
not eax
or eax, 0xfffffffe
cmp eax, 0xffffffff
mov eax, 0xaef76f05
jne 0x40d4bb
mov eax, 0x7564a2d5
mov dword [ebp - 0x38], eax
jmp 0x40d030
mov al, byte [ebp - 0xa]
test al, al
mov eax, 0xf2e1597e
jne 0x40d4d4
mov eax, 0xe2255a45
mov dword [ebp - 0x38], eax
jmp 0x40d030
cmp eax, 0xa8a8e204
jne 0x40d030
mov dword [ebp - 0x38], 0xc87171ec
jmp 0x40d030
mov eax, dword [ebp - 0x14]
add esp, 0x40
pop esi
pop edi
pop ebp
ret