Function at 0x40e970
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43ba93
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ebx
sub esp, 0x3c8
mov eax, dword fs:[0x18]
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x30], 0
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x2c], 7
mov eax, dword [eax + 0xc]
mov esi, dword [eax + 0x1c]
xor eax, eax
mov word [ebp - 0x40], ax
mov dword [ebp - 0x18], esi
mov edx, dword [esi + 0x20]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x14], eax
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e9e0
sub ecx, dword [ebp - 0x14]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x40]
call fcn.00402710
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 0
push eax
call fcn.0040ecb0
and eax, 0x1f
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x14], eax
cmp edx, 8
jb 0x40ea51
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ea47
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ec9e
push edx
push ecx
call fcn.0041ee0c
add esp, 8
mov edx, dword [esi + 8]
mov eax, dword [ebp - 0x18]
mov esi, dword [esi + 0x10]
add eax, 0x2c
dec esi
add esi, edx
mov ecx, dword [eax]
cmp ecx, eax
je 0x40ea81
cmp ecx, edx
jb 0x40ea6e
cmp ecx, esi
jb 0x40ea76
mov ecx, dword [ecx]
cmp ecx, eax
jne 0x40ea66
jmp 0x40ea81
mov eax, dword [ebp - 0x14]
shl eax, 3
sub ecx, eax
mov dword [edi + 4], ecx
push 0x248
lea eax, [ebp - 0x3d8]
mov esi, 0xa
push 0
push eax
call fcn.004213e0
add esp, 0xc
lea eax, [ebp - 0x70]
push 0x30
push 0
push eax
call fcn.004213e0
mov eax, dword [edi]
lea edx, [ebp - 0x3d8]
add esp, 0xc
mov ecx, dword [eax + 8]
push edx
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov edx, dword [ebp - 0x3cc]
test edx, edx
jne 0x40eaf9
test esi, esi
jle 0x40eaf1
mov eax, dword [edi]
lea edx, [ebp - 0x3d8]
push edx
mov ecx, dword [eax + 8]
mov eax, dword [ecx]
call dword [eax + 0x3c]
push 0xa
dec esi
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 0x3cc]
test edx, edx
je 0x40eac7
jmp 0x40eaf9
test edx, edx
je 0x40eb83
mov ecx, dword [edi]
mov eax, edx
xorps xmm0, xmm0
or eax, 0
mov eax, dword fs:[0x18]
movlpd qword [ebp - 0x28], xmm0
jne 0x40eb21
mov dword [eax + 0xbf4], 0xc0000141
mov eax, 0xc0000141
jmp 0x40eb50
mov dword [eax + 0xbf4], 0
lea esi, [ebp - 0x28]
mov eax, dword [ecx + 0xa4]
push esi
push 0x30
lea esi, [ebp - 0xa0]
mov ecx, dword [eax + 8]
push esi
push 0
push edx
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
nop dword [eax + eax]
mov ecx, dword fs:[0x18]
lea edx, [ebp - 0x70]
push edx
mov dword [ecx + 0xbf4], eax
mov ecx, dword [edi]
mov eax, dword [ebp - 0x8c]
add eax, 0xfffffff8
cdq
mov ecx, dword [ecx + 8]
push edx
push eax
mov esi, dword [ecx]
mov eax, dword [esi + 0x18]
call eax
test eax, eax
jne 0x40eb83
mov eax, dword [ebp - 0x68]
mov dword [edi + 0xc], eax
push 0
push 2
push 6
call fcn.00401410
add esp, 0xc
test al, al
je 0x40ec7a
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
test eax, eax
je 0x40ec7a
mov eax, dword [eax + 0xc]
xor esi, esi
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x14], eax
add eax, 0x58
cmp dword [eax + 8], esi
je 0x40ebce
nop dword [eax]
mov esi, dword [eax + 8]
and esi, 0xfffffff8
mov eax, esi
cmp dword [esi + 8], 0
jne 0x40ebc0
lea ecx, [ebp - 0x190]
call fcn.00409130
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x190]
mov dword [ebp - 4], 1
xor edi, edi
push dword [eax + 8]
call fcn.004093c0
mov eax, dword [ebp - 0x14c]
mov ecx, dword [ebp - 0x148]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x24], ecx
cmp eax, ecx
je 0x40ec30
nop dword [eax]
push 0x48e864
push eax
call fcn.00428601
add esp, 8
test eax, eax
je 0x40ec43
mov eax, dword [ebp - 0x18]
add eax, 0x28
mov dword [ebp - 0x18], eax
cmp eax, dword [ebp - 0x24]
jne 0x40ec10
xor edx, edx
cmp edi, edx
je 0x40ec65
cmp dword [edi], esi
je 0x40ec5b
add edi, 4
cmp edi, edx
jne 0x40ec36
jmp 0x40ec65
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov ecx, dword [edx + 0xc]
mov eax, dword [eax + 8]
mov edx, dword [edx + 8]
add edx, eax
add edx, ecx
lea edi, [eax + ecx]
jmp 0x40ec32
cmp edi, edx
je 0x40ec65
mov eax, dword [ebp - 0x1c]
mov dword [eax + 8], edi
lea ecx, [ebp - 0x190]
mov dword [ebp - 4], 0xffffffff
call fcn.00409280
mov edi, dword [ebp - 0x1c]
mov ecx, edi
call fcn.0040eee0
lea ecx, [edi + 0x28]
call fcn.0040f4e0
mov ecx, dword [ebp - 0xc]
mov al, 1
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00424b90
int3