Function at 0x402740
Capabilities:
Allocate or change rwx memory
Check for software breakpoints
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
mov eax, dword [0x442040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
mov esi, edx
push edi
mov dword [ebp - 0x80], ebx
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x48a00c], eax
je 0x402785
pop edi
pop esi
mov eax, 0x10dd
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040f2b7
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [0x48a008]
test eax, eax
jne 0x402a53
test ebx, ebx
je 0x4027ac
mov ecx, dword [ebx]
test ecx, ecx
jne 0x4027c4
mov dword [0x48a008], 6
mov dword [0x48a014], ebx
pop edi
pop esi
mov eax, 6
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040f2b7
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
mov dword [ebp - 0x70], eax
call fcn.00402150
mov ebx, eax
mov ecx, esi
mov dword [ebp - 0x78], ebx
call fcn.00402150
mov dword [ebp - 0x74], eax
cmp eax, ebx
jne 0x4027f4
cmp dword [0x489e98], edi
jne 0x402a49
xor edx, edx
jmp 0x402a03
push 0x18
call fcn.0040f747
add esp, 4
mov dword [ebp - 0x70], eax
mov ecx, ebx
call fcn.00401fb0
mov edx, eax
mov dword [ebp - 0x6c], edx
test edx, edx
jne 0x402819
lea edi, [eax + 8]
jmp 0x402a03
xorps xmm0, xmm0
mov esi, ebx
movq qword [edx + 0x38], xmm0
mov ebx, edx
jmp 0x40282a
mov ebx, dword [ebp - 0x7c]
push 0x5c
lea eax, [ebp - 0x64]
mov edi, esi
push 0
push eax
call fcn.00411990
add esp, 0xc
mov dword [ebp - 0x4c], 0
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x68], 0
test ebx, ebx
mov dword [ebp - 0x58], eax
lea ecx, [ebp - 0x48]
lea eax, [ebp - 0x68]
cmovne ecx, ebx
mov dword [ebp - 0x54], eax
test esi, esi
jne 0x40286c
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x402883
movzx eax, byte [esi]
push esi
push ecx
lea ecx, [ebp - 0x64]
lea eax, [eax*8 + 0x43b460]
push eax
mov eax, dword [eax + 4]
call eax
mov esi, eax
mov edx, dword [ebp - 0x6c]
mov eax, esi
sub eax, edi
add eax, dword [ebp - 0x68]
add ebx, eax
mov dword [ebp - 0x7c], ebx
mov ebx, esi
sub ebx, dword [ebp - 0x78]
mov cl, byte [ebp - 0x7c]
mov al, bl
sub cl, dl
and al, 7
shl cl, 3
or cl, al
mov byte [edx + 0x38], cl
mov al, byte [edi]
cmp al, 0xeb
je 0x4028f9
cmp al, 0xe9
je 0x4028f9
cmp al, 0xe0
je 0x4028f9
cmp al, 0xc2
je 0x4028f9
cmp al, 0xc3
je 0x4028f9
cmp al, 0xcc
je 0x4028f9
cmp al, 0xff
jne 0x4028cc
cmp byte [edi + 1], 0x25
jmp 0x4028ee
cmp al, 0x26
je 0x4028e4
cmp al, 0x2e
je 0x4028e4
cmp al, 0x36
je 0x4028e4
cmp al, 0xe3
je 0x4028e4
cmp al, 0x64
je 0x4028e4
cmp al, 0x65
jne 0x4028f0
cmp byte [edi + 1], 0xff
jne 0x4028f0
cmp byte [edi + 2], 0x25
je 0x4028f9
cmp ebx, 5
jb 0x402827
mov edi, dword [ebp - 0x78]
cmp ebx, 5
jae 0x402914
cmp byte [esi], 0x90
jne 0x4029f5
inc esi
mov ebx, esi
sub ebx, edi
cmp ebx, 5
jb 0x402901
mov eax, dword [ebp - 0x7c]
lea ecx, [edx + 0x1e]
cmp eax, ecx
jbe 0x40291f
int3
sub al, dl
mov byte [edx + 0x36], bl
push ebx
mov byte [edx + 0x1e], al
lea eax, [edx + 0x20]
push edi
push eax
call fcn.00411ba0
add esp, 0xc
cmp ebx, 0x19
jbe 0x402947
mov edx, dword [ebp - 0x6c]
mov edi, 6
jmp 0x402a03
mov esi, dword [ebp - 0x6c]
lea edx, [ebx + edi]
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x74], 0
movzx ecx, byte [esi + 0x1e]
add ecx, esi
mov dword [esi + 0x44], eax
mov dword [esi + 0x40], edx
lea eax, [ecx + 5]
mov byte [ecx], 0xe9
sub edx, eax
mov dword [ecx + 1], edx
lea edx, [esi + 0x1e]
add ecx, 5
mov eax, edx
sub eax, ecx
cmp ecx, edx
cmova eax, dword [ebp - 0x74]
test eax, eax
je 0x402991
push eax
push 0xcc
push ecx
call fcn.00411990
add esp, 0xc
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x40
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4029b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x6c]
mov edi, eax
jmp 0x402a03
mov ecx, dword [ebp - 0x70]
mov eax, dword [ebp - 0x80]
mov dword [ecx + 8], eax
mov dword [ecx + 0x10], esi
mov dword [ecx + 0xc], edi
mov dword [ecx + 4], 0
mov eax, dword [ebp - 8]
pop edi
mov dword [ecx + 0x14], eax
mov eax, dword [0x48a020]
pop esi
mov dword [ecx], eax
xor eax, eax
mov dword [0x48a020], ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040f2b7
mov esp, ebp
pop ebp
ret 0xc
cmp dword [0x489e98], 0
mov edi, 9
jne 0x402a16
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], edx
mov dword [0x48a008], edi
test edx, edx
je 0x402a3a
push 0x48
mov esi, edx
push 0
push edx
and esi, 0xffff0000
call fcn.00411990
mov edx, dword [ebp - 0x6c]
add esp, 0xc
mov eax, dword [esi + 8]
mov dword [edx + 0x40], eax
mov eax, dword [ebp - 0x70]
mov dword [esi + 8], edx
test eax, eax
je 0x402a49
push 0x18
push eax
call fcn.0040f777
add esp, 8
mov eax, dword [ebp - 0x80]
mov dword [0x48a014], eax
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040f2b7
mov esp, ebp
pop ebp
ret 0xc