Function at 0x406760
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
mov eax, dword [0x52038c]
xor eax, esp
mov dword [esp + 0x58], eax
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x34]
push ebx
push esi
push edi
mov dword [0x525aac], eax
xorps xmm0, xmm0
xor eax, eax
movq qword [esp + 0x58], xmm0
push eax
mov dword [esp + 0x64], 0
push 0x50d6e8
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x5c], 7
mov dword [esp + 0x58], 0
mov word [esp + 0x48], ax
call fcn.00404670
lea ecx, [esp + 0x28]
call fcn.0040f7a0
mov edx, eax
cmp dword [edx + 0x14], 8
jb 0x4067e1
mov edx, dword [edx]
xor eax, eax
mov dword [esp + 0x24], 7
mov dword [esp + 0x20], 0
mov word [esp + 0x10], ax
cmp word [edx], ax
jne 0x406801
xor ecx, ecx
jmp 0x406815
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406806
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x18]
call fcn.00404670
lea eax, [esp + 0x40]
push eax
lea edx, [esp + 0x5c]
lea ecx, [esp + 0x14]
call fcn.0040f5b0
mov eax, dword [esp + 0x28]
add esp, 4
cmp eax, 8
jb 0x40684d
inc eax
lea ecx, [esp + 0x10]
push eax
push dword [esp + 0x14]
call fcn.00404840
xor eax, eax
mov dword [esp + 0x24], 7
mov word [esp + 0x10], ax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x20], 0
cmp eax, 8
jb 0x40687c
inc eax
lea ecx, [esp + 0x28]
push eax
push dword [esp + 0x2c]
call fcn.00404840
xor eax, eax
mov dword [esp + 0x3c], 7
mov word [esp + 0x28], ax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x38], 0
cmp eax, 8
jb 0x4068ab
inc eax
lea ecx, [esp + 0x40]
push eax
push dword [esp + 0x44]
call fcn.00404840
mov edi, dword [esp + 0x5c]
mov eax, edi
mov ebx, dword [esp + 0x58]
sub eax, ebx
sar eax, 2
cmp eax, 1
jbe 0x406922
push 0x50ec7c
push str.main_wnd
call dword [sym.imp.USER32.dll_FindWindowW]
test eax, eax
jne 0x40699f
mov esi, ebx
cmp ebx, edi
je 0x406922
nop dword [eax]
mov edi, dword [esi]
call sub.KERNEL32.dll_GetCurrentProcessId
cmp edi, eax
je 0x406919
test edi, edi
je 0x406919
push edi
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x406919
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
je 0x406919
cmp edi, 0xffffffff
je 0x406919
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esi, 4
cmp esi, dword [esp + 0x5c]
jne 0x4068e0
lea ecx, [esp + 0x28]
call fcn.0040feb0
mov edx, eax
cmp dword [edx + 0x14], 8
jb 0x406935
mov edx, dword [edx]
cmp word [edx], 0
jne 0x40693f
xor ecx, ecx
jmp 0x406953
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406944
sub ecx, esi
sar ecx, 1
push ecx
push edx
mov ecx, 0x525ad8
call fcn.00404670
mov eax, dword [esp + 0x3c]
cmp eax, 8
jb 0x406977
inc eax
lea ecx, [esp + 0x28]
push eax
push dword [esp + 0x2c]
call fcn.00404840
mov eax, dword [0x525af0]
mov ecx, 0x525af0
mov dword [0x525b08], 1
mov byte [0x525b04], 1
mov dword [0x525b18], 0
call dword [eax + 4]
test ebx, ebx
je 0x4069b3
mov eax, dword [esp + 0x60]
sub eax, ebx
sar eax, 2
push eax
push ebx
call fcn.00405e40
mov ecx, dword [esp + 0x64]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004a4c3a
mov esp, ebp
pop ebp
ret 0x10