Function at 0x40c940
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4401a0
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x44db90]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
mov edi, edx
mov dword [ebp - 0x24], ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x28], esp
push 0xffffffffffffffff
mov byte [ebp - 4], 2
push ebx
lea edx, [ebp + 0x2c]
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], ebx
push edx
lea esi, [ebp - 0x14]
mov byte [ecx], bl
call fcn.00407ee0
mov ecx, esi
call fcn.00409080
mov eax, dword [ebp - 0x24]
add esp, 0x1c
mov dword [ebp - 0x28], ebx
cmp dword [eax], ebx
jne 0x40cbc1
cmp dword [ebp + 0x4c], ebx
jne 0x40c9f2
mov eax, dword [edi]
cmp eax, ebx
je 0x40c9cb
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + 0x34]
cmp eax, ebx
jne 0x40c9d9
xor eax, eax
jmp 0x40c9f0
mov edx, dword [eax + 0x1c]
push 0x40
push 0x1000
push 0x1000
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [edi], eax
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x3c], esp
push 0xffffffffffffffff
mov byte [ebp - 4], 5
push ebx
lea eax, [ebp + 0x10]
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], ebx
push eax
lea esi, [ebp - 0x20]
mov byte [ecx], bl
call fcn.00407ee0
mov ecx, esi
call fcn.00409080
mov ecx, dword [ebp - 0x10]
sub ecx, dword [edi]
mov edx, dword [ebp + 0xc]
sub ecx, dword [ebp - 0x1c]
push 5
lea esi, [ecx + edx - 5]
call fcn.00414c24
mov byte [eax], 0xe9
mov dword [eax + 1], esi
mov esi, dword [edi]
sub esi, dword [ebp + 0xc]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x10]
push eax
mov dword [ebp - 0x34], 5
sub esi, 5
call fcn.00414c24
mov ecx, dword [ebp - 0x10]
add esp, 0x24
mov byte [eax], 0xe9
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], ecx
mov dword [eax + 1], esi
cmp ecx, 5
jle 0x40ca95
add ecx, 0xfffffffb
push ecx
add eax, 5
push 0x90
push eax
call fcn.0042ad40
add esp, 0xc
mov esi, dword [ebp - 0x18]
mov edx, dword [edi]
add esi, 0x34
push esi
lea ecx, [ebp - 0x20]
call fcn.00410f80
mov edx, dword [edi]
add edx, dword [ebp - 0x1c]
push esi
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x18], eax
call fcn.00410f80
mov edi, dword [ebp - 0x18]
mov edx, dword [ebp + 0xc]
push esi
lea ecx, [ebp - 0x30]
and edi, eax
call fcn.00410f80
and edi, eax
mov eax, dword [ebp - 0x28]
cmp eax, ebx
je 0x40cae8
mov esi, dword [esi]
cmp esi, ebx
je 0x40cae8
mov ecx, dword [esi + 0x1c]
push 0x8000
push ebx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp edi, ebx
jne 0x40cb82
mov edx, dword [ebp - 0x38]
push edx
call fcn.00429011
mov esi, dword [ebp - 0x10]
add esp, 4
cmp esi, ebx
jle 0x40cb0f
mov eax, dword [ebp - 0x30]
push eax
call fcn.00429011
add esp, 4
mov eax, dword [ebp - 0x20]
cmp eax, ebx
je 0x40cb24
cmp dword [ebp - 0x1c], ebx
jle 0x40cb24
push eax
call fcn.00429011
add esp, 4
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x40cb38
cmp esi, ebx
jle 0x40cb38
push eax
call fcn.00429011
add esp, 4
mov esi, 0x10
cmp dword [ebp + 0x24], esi
jb 0x40cb4e
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00428a42
add esp, 4
mov dword [ebp + 0x24], 0xf
mov dword [ebp + 0x20], ebx
mov byte [ebp + 0x10], bl
cmp dword [ebp + 0x40], esi
jb 0x40cb6c
mov edx, dword [ebp + 0x2c]
push edx
call fcn.00428a42
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x48
mov eax, dword [ebp - 0x38]
push eax
call fcn.00429011
add esp, 4
cmp dword [ebp - 0x10], ebx
jle 0x40cb9f
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.00429011
add esp, 4
mov eax, dword [ebp - 0x20]
cmp eax, ebx
je 0x40cc55
cmp dword [ebp - 0x1c], ebx
jle 0x40cc55
push eax
call fcn.00429011
add esp, 4
jmp 0x40cc55
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp + 0xc]
add esi, 0x34
push esi
lea ecx, [ebp - 0x14]
call fcn.00410f80
test eax, eax
jne 0x40cc3a
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x40cbec
cmp dword [ebp - 0x10], ebx
jle 0x40cbec
push eax
call fcn.00429011
add esp, 4
mov esi, 0x10
cmp dword [ebp + 0x24], esi
jb 0x40cc02
mov edx, dword [ebp + 0x10]
push edx
call fcn.00428a42
add esp, 4
mov dword [ebp + 0x24], 0xf
mov dword [ebp + 0x20], ebx
mov byte [ebp + 0x10], bl
cmp dword [ebp + 0x40], esi
jb 0x40cb6c
mov eax, dword [ebp + 0x2c]
push eax
call fcn.00428a42
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x48
mov eax, dword [esi]
cmp eax, ebx
je 0x40cc53
mov ecx, dword [edi]
mov edx, dword [eax + 0x1c]
push 0x8000
push ebx
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov dword [edi], ebx
mov ecx, dword [ebp - 0x24]
xor eax, eax
cmp dword [ecx], ebx
mov edx, ecx
sete al
mov esi, eax
mov dword [edx], esi
cmp dword [ebp + 0x48], ebx
je 0x40cc8a
push 0x40005
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
xor eax, eax
cmp esi, ebx
setne al
add eax, 0x95
push eax
call dword [sym.imp.WINMM.dll_PlaySoundW]
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x40cc9f
cmp dword [ebp - 0x10], ebx
jle 0x40cc9f
push eax
call fcn.00429011
add esp, 4
mov esi, 0x10
cmp dword [ebp + 0x24], esi
jb 0x40ccb5
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00428a42
add esp, 4
mov dword [ebp + 0x24], 0xf
mov dword [ebp + 0x20], ebx
mov byte [ebp + 0x10], bl
cmp dword [ebp + 0x40], esi
jb 0x40ccd3
mov edx, dword [ebp + 0x2c]
push edx
call fcn.00428a42
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x48