Function at 0x40ee80
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x447268
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x45a5d0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 0x18]
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0
lea edx, [ebp - 0x68]
mov dword [ebp - 4], 0
call fcn.0040b7d0
cmp byte [esi], 0
jne 0x40f171
cmp dword [edi], 0
mov cl, byte [ebp + 0x20]
setne al
mov byte [ebp - 0x45], 1
mov byte [ebp - 0x51], al
test cl, cl
jne 0x40ef1f
test al, al
jne 0x40ef1f
mov eax, dword [ebx + 0x6c]
push 0x40
push 0x3000
push 0x800
push 0
push dword [eax + 0x58]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov cl, byte [ebp + 0x20]
mov dword [edi], eax
mov al, byte [ebp - 0x51]
cmp dword [edi], 0
jne 0x40efbb
sub esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x44]
call fcn.00406a40
add esp, 0xc
push eax
mov edx, 0x45feb8
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2c]
call fcn.00410d40
add esp, 4
mov ecx, 0x45fd50
cmp dword [0x45fd64], 8
cmovae ecx, dword [0x45fd50]
cmp dword [eax + 0x14], 8
jb 0x40ef6e
mov eax, dword [eax]
push 0x30
push ecx
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp dword [ebp - 0x18], 8
jb 0x40ef8b
push dword [ebp - 0x2c]
call fcn.0042cfae
add esp, 4
xor eax, eax
mov dword [ebp - 0x18], 7
cmp dword [ebp - 0x30], 8
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
jb 0x40f066
push dword [ebp - 0x44]
call fcn.0042cfae
add esp, 4
xor bl, bl
jmp 0x40f13b
test cl, cl
jne 0x40efc7
test al, al
jne 0x40f09a
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov ecx, dword [ebp - 0x6c]
lea edx, [ebp - 0x5c]
mov byte [ebp - 4], 3
call fcn.0040b7d0
mov edx, dword [ebp - 0x64]
lea eax, [ebp - 0x50]
push ecx
mov ecx, dword [ebp + 8]
push eax
push 5
lea edx, [edx + ecx]
mov ecx, dword [edi]
add ecx, dword [ebp - 0x58]
call fcn.0040bcc0
add esp, 0xc
lea eax, [ebp - 0x5c]
lea ecx, [ebx + 0x68]
push eax
push dword [edi]
call fcn.00413360
mov edx, dword [edi]
lea ecx, [ebx + 0x68]
add edx, dword [ebp - 0x58]
and al, 1
mov byte [ebp - 0x45], al
lea eax, [ebp - 0x50]
push eax
push edx
call fcn.00413360
and byte [ebp - 0x45], al
mov eax, dword [ebp - 0x50]
jne 0x40f06d
test eax, eax
je 0x40f04f
cmp dword [ebp - 0x4c], 0
jbe 0x40f04f
push eax
call fcn.0042d9ad
add esp, 4
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x40f066
mov ecx, dword [ebp - 0x58]
test ecx, ecx
je 0x40f066
push eax
call fcn.0042d9ad
add esp, 4
xor bl, bl
jmp 0x40f13b
test eax, eax
je 0x40f080
cmp dword [ebp - 0x4c], 0
jbe 0x40f080
push eax
call fcn.0042d9ad
add esp, 4
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x40f097
mov ecx, dword [ebp - 0x58]
test ecx, ecx
je 0x40f097
push eax
call fcn.0042d9ad
add esp, 4
mov esi, dword [ebp - 0x60]
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
push ecx
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 4
mov edx, dword [edi]
mov edi, dword [ebp + 8]
mov ecx, edi
push eax
push dword [ebp - 0x64]
call fcn.0040bcc0
add esp, 0xc
lea eax, [ebp - 0x50]
lea ecx, [ebx + 0x68]
push eax
push edi
call fcn.00413360
test byte [ebp - 0x45], al
mov eax, dword [ebp - 0x50]
jne 0x40f0f7
test eax, eax
je 0x40f184
cmp dword [ebp - 0x4c], 0
jbe 0x40f184
push eax
call fcn.0042d9ad
add esp, 4
xor bl, bl
jmp 0x40f13b
test eax, eax
je 0x40f10a
cmp dword [ebp - 0x4c], 0
jbe 0x40f10a
push eax
call fcn.0042d9ad
add esp, 4
cmp byte [esi], 0
sete bl
cmp byte [ebp + 0x1c], 0
mov byte [esi], bl
je 0x40f139
push 0x40005
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
xor eax, eax
test bl, bl
setne al
add eax, 0x95
push eax
call dword [sym.imp.WINMM.dll_PlaySoundW]
mov bl, 1
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x40f151
cmp dword [ebp - 0x64], 0
jbe 0x40f151
push eax
call fcn.0042d9ad
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0042cfb3
mov esp, ebp
pop ebp
ret 0x1c
lea eax, [ebp - 0x68]
push eax
push dword [ebp + 8]
lea ecx, [ebx + 0x68]
call fcn.00413360
test al, al
jne 0x40f10a
xor bl, bl
jmp 0x40f13b