Function at 0x40e820
Capabilities:
Check for foreground window switch
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x465583
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47a770]
xor eax, esp
push eax
lea eax, [esp + 0xf4]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x108]
xor eax, eax
mov dword [esp + 0xfc], eax
push eax
mov dword [esp + 0x94], eax
call fcn.0044bf56
add esp, 4
push eax
call fcn.0044bf22
add esp, 4
call fcn.0044bf34
cdq
idiv dword [0x480c2c]
mov dword [esp + 0x78], edx
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea esp, [esp]
mov esi, dword [esp + 0x104]
push ecx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
add esi, 0xfffffff0
mov dword [esp + 0x1c], esp
mov dword [esp + 0x20], esp
call edx
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x40e8c7
cmp eax, dword [esi]
jne 0x40e8c7
mov edi, esi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x40e8fb
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x410074
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
inc eax
push eax
add esi, 0x10
push esi
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.0044b46f
add esp, 0x10
mov edx, dword [esp + 0x20]
add edi, 0x10
mov dword [edx], edi
mov edi, ebp
call fcn.00407850
mov eax, dword [esp + 0x110]
mov esi, dword [esp + 0x108]
add esp, 4
push eax
push ecx
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
add esi, 0xfffffff0
mov dword [esp + 0x20], esp
mov dword [esp + 0x24], esp
call eax
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
jl 0x40e94d
cmp eax, dword [esi]
jne 0x40e94d
mov edi, esi
mov ecx, 1
lock xadd dword [edx], ecx
jmp 0x40e981
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x410074
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
inc eax
push eax
add esi, 0x10
push esi
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.0044b46f
add esp, 0x10
mov edx, dword [esp + 0x24]
add edi, 0x10
mov ecx, ebp
mov dword [edx], edi
call fcn.00408690
mov eax, dword [0x47baf4]
mov esi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
add esp, 8
lea ecx, [esp + 0x88]
push ecx
push ebp
mov dword [esp + 0x24], eax
call esi
mov edx, dword [esp + 0x88]
push edx
push 0
push 0x1fffff
mov dword [esp + 0x4c], 0
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edx, dword [esp + 0x1c]
mov edi, eax
lea eax, [esp + 0xec]
push eax
push 4
lea ecx, [esp + 0x48]
push ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x47baf8]
lea ecx, [esp + 0x94]
push ecx
push ebp
mov dword [esp + 0x24], eax
call esi
mov edx, dword [esp + 0x94]
push edx
push 0
push 0x1fffff
mov dword [esp + 0x50], 0
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edx, dword [esp + 0x1c]
mov edi, eax
lea eax, [esp + 0xe4]
push eax
push 4
lea ecx, [esp + 0x4c]
push ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x40], 0
jne case.0x40ec46.1002
cmp dword [esp + 0x44], 0x457
jne case.0x40ec46.1002
mov eax, dword [0x480c28]
push eax
call ebx
push 0
call fcn.0044bf56
add esp, 4
push eax
call fcn.0044bf22
add esp, 4
call fcn.0044bf34
mov ecx, dword [0x480c2c]
cdq
idiv ecx
mov eax, ecx
mov edi, edx
cdq
sub eax, edx
sar eax, 1
sub eax, edi
mov dword [esp + 0x24], eax
call fcn.0044bf34
mov ecx, dword [0x480c2c]
cdq
idiv ecx
mov eax, ecx
mov edi, edx
cdq
sub eax, edx
sar eax, 1
sub eax, edi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x104]
add eax, 0xfffffff0
push eax
call fcn.00429de0
mov ecx, dword [0x47bb0c]
add esp, 4
lea edx, [esp + 0x84]
push edx
push ebp
mov dword [esp + 0x30], eax
mov dword [esp + 0x24], ecx
call esi
mov eax, dword [esp + 0x84]
push eax
push 0
push 0x1fffff
mov dword [esp + 0x54], 0
call dword [sym.imp.KERNEL32.dll_OpenProcess]
lea ecx, [esp + 0xe0]
push ecx
push 4
mov edi, eax
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x50]
push edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x48]
lea edx, [esp + 0x8c]
push edx
push ebp
mov dword [esp + 0x24], ecx
call esi
mov eax, dword [esp + 0x8c]
push eax
push 0
push 0x1fffff
mov dword [esp + 0x58], 0
call dword [sym.imp.KERNEL32.dll_OpenProcess]
lea ecx, [esp + 0xe8]
push ecx
mov edi, eax
mov eax, dword [esp + 0x20]
push 4
lea edx, [esp + 0x54]
push edx
add eax, 0x1ec
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], ecx
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40eb9d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x104]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x20], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
mov dword [esi], eax
add esp, 4
mov esi, ebp
lea edi, [esp + 0x30]
call fcn.004045c0
mov edi, dword [esp + 0x30]
add esp, 4
cmp dword [esp + 0x38], edi
jne 0x40ec1a
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x104]
mov esi, dword [esp + 0x24]
add ecx, 0xe3
push ecx
push ecx
mov dword [esp + 0x24], esp
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
push eax
add esi, 0x13e
call fcn.00429de0
mov edx, dword [esp + 0x28]
add eax, 0x10
mov dword [edx], eax
add esp, 4
mov ecx, esi
mov edx, ebp
call fcn.004062f0
add esp, 8
mov eax, dword [esp + 0x18]
cmp eax, 0x477
jg 0x40f7b7
je 0x40f778
add eax, 0xfffffc17
cmp eax, 0x8d
ja case.0x40ec46.1002
movzx eax, byte [eax + 0x410090]
jmp dword [eax*4 + 0x41007c]
mov ecx, dword [esp + 0x10c]
mov eax, dword [esp + 0x104]
push ecx
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x20], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
add esp, 4
mov ecx, ebp
mov dword [esi], eax
call fcn.00409040
mov eax, dword [0x480c2c]
cdq
sub eax, edx
sar eax, 1
add esp, 8
cmp dword [esp + 0x78], eax
jle 0x40ee3f
cmp edi, 9
jle 0x40ed45
cmp dword [esp + 0x30], 0xa
jle 0x40ed45
xor esi, esi
mov dword [esp + 0x18], esi
call fcn.0044bf34
cmp edi, 0xf
jge 0x40ecc4
mov eax, 0xf
sub eax, edi
lea esi, [eax + eax*4]
add esi, esi
add esi, esi
mov ecx, dword [esp + 0x30]
cmp ecx, 0xd
jge 0x40ecdd
mov eax, 0xc
sub eax, ecx
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
jmp 0x40ece1
mov eax, dword [esp + 0x18]
cmp edi, 0x21
jle 0x40ecf4
mov esi, 0x21
sub esi, edi
lea esi, [esi + esi*4]
add esi, esi
add esi, esi
lea edx, [edi + edi*4]
add edx, edx
add edx, edx
lea ecx, [ecx + ecx*4 + 0x23]
mov edi, 0x34d
sub edi, edx
push 0x5a
push ecx
lea edx, [eax + ecx*4]
sub edi, esi
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x30], edx
mov dword [esp + 0x20], esp
call fcn.00403870
mov esi, ebp
call fcn.00405540
push 0x32
call ebx
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
add ecx, eax
push ecx
add edi, edx
jmp 0x40eef3
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
add eax, 0x1ae
push eax
push ecx
lea eax, [esp + 0x10c]
mov esi, esp
add edi, 0xd6
mov dword [esp + 0x20], esp
call fcn.00403870
mov ecx, edi
mov edx, ebp
call fcn.004062f0
add esp, 8
xor edi, edi
lea ebx, [ebx]
push 0xc8
call ebx
mov eax, dword [esp + 0x104]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x1c], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
mov dword [esi], eax
add esp, 4
mov eax, ebp
call fcn.00403f70
add esp, 4
cmp eax, 0x3e9
je 0x40edbd
inc edi
cmp edi, 7
jle 0x40ed80
mov dword [esp + 0x1c], 0
push 0xc8
call ebx
mov eax, dword [esp + 0x104]
add eax, 0xfffffff0
push eax
call fcn.00429de0
mov ecx, dword [0x47bb0c]
add esp, 4
mov esi, eax
push ecx
mov ecx, ebp
add esi, 0x10
call fcn.0042bd60
add eax, 0x1ec
push eax
mov ecx, ebp
call fcn.0042bd60
mov edi, eax
lea eax, [esi - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ee1d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp edi, 0x3e9
je 0x40ee33
mov eax, dword [esp + 0x1c]
inc eax
cmp eax, 7
mov dword [esp + 0x1c], eax
jle 0x40edc5
push 0xc8
call ebx
jmp case.0x40ec46.1002
cmp edi, 0xd
jle 0x40ef1e
cmp dword [esp + 0x30], 0xb
jge 0x40ef1e
xor esi, esi
mov dword [esp + 0x1c], esi
call fcn.0044bf34
cmp edi, 0xf
jge 0x40ee71
mov eax, 0xf
sub eax, edi
lea esi, [eax + eax*4]
add esi, esi
add esi, esi
mov ecx, dword [esp + 0x30]
cmp ecx, 0xd
jge 0x40ee8c
mov eax, 0xc
sub eax, ecx
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
mov dword [esp + 0x1c], eax
cmp edi, 0x21
jle 0x40ee9f
mov eax, 0x21
sub eax, edi
lea esi, [eax + eax*4]
add esi, esi
add esi, esi
mov eax, dword [esp + 0x30]
lea ecx, [edi + edi*4]
add ecx, ecx
lea edx, [eax + eax*4 - 0xa]
mov eax, dword [esp + 0x1c]
add ecx, ecx
mov edi, 0x20d
sub edi, ecx
lea ecx, [eax + edx*4]
push 0x5a
push ecx
sub edi, esi
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x30], ecx
mov dword [esp + 0x20], esp
call fcn.00403870
mov esi, ebp
call fcn.00405540
push 0x32
call ebx
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
add eax, edx
push eax
add edi, ecx
push ecx
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x20], esp
call fcn.00403870
mov ecx, edi
mov edx, ebp
call fcn.004062f0
add esp, 8
push 0x4b0
call ebx
jmp case.0x40ec46.1002
mov edx, dword [esp + 0x20]
add edx, 0xe6
push edx
push ecx
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x20], esp
call fcn.00403870
mov ecx, dword [esp + 0x2c]
mov edx, ebp
call fcn.004062f0
add esp, 8
xor edi, edi
lea esp, [esp]
push 0xc8
call ebx
mov eax, dword [esp + 0x104]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x1c], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
mov dword [esi], eax
add esp, 4
mov eax, ebp
call fcn.00403f70
add esp, 4
cmp eax, 0x3e9
je 0x40ef8d
inc edi
cmp edi, 7
jle 0x40ef50
mov dword [esp + 0x1c], 0
push 0xc8
call ebx
mov eax, dword [esp + 0x104]
add eax, 0xfffffff0
push eax
call fcn.00429de0
mov esi, eax
mov eax, dword [0x47bb0c]
add esp, 4
push eax
mov ecx, ebp
add esi, 0x10
call fcn.0042bd60
add eax, 0x1ec
push eax
mov ecx, ebp
call fcn.0042bd60
mov edi, eax
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40efec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp edi, 0x3e9
je 0x40f002
mov eax, dword [esp + 0x1c]
inc eax
cmp eax, 7
mov dword [esp + 0x1c], eax
jle 0x40ef95
push 0xc8
call ebx
jmp case.0x40ec46.1002
mov ecx, dword [esp + 0x10c]
mov eax, dword [esp + 0x104]
push ecx
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x20], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
add esp, 4
mov ecx, ebp
mov dword [esi], eax
call fcn.00409040
add esp, 8
cmp edi, 0x20b
jl 0x40f14b
cmp dword [esp + 0x30], 0x16
jg 0x40f14b
xor esi, esi
mov dword [esp + 0x18], esi
call fcn.0044bf34
cdq
mov ecx, 0x2d
idiv ecx
cmp edi, 0xf
mov dword [esp + 0x1c], edx
jge 0x40f082
mov eax, 0xf
sub eax, edi
lea edx, [eax + eax*4]
add edx, edx
add edx, edx
jmp 0x40f086
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x30]
cmp ecx, 0xd
jge 0x40f09d
mov esi, 0xc
sub esi, ecx
lea esi, [esi + esi*4]
add esi, esi
add esi, esi
cmp ecx, 0x218
jle 0x40f0b3
mov esi, 0x218
sub esi, ecx
lea esi, [esi + esi*4]
add esi, esi
add esi, esi
lea eax, [edi + edi*4]
add eax, eax
lea ecx, [ecx + ecx*4 + 0x32]
add eax, eax
lea ecx, [esi + ecx*4]
sub ecx, dword [esp + 0x1c]
mov edi, eax
add ecx, dword [esp + 0x20]
mov eax, 0x2bd9
sub eax, edi
sub eax, edx
mov edx, dword [esp + 0x24]
push ecx
push ecx
lea edi, [eax + edx + 0x3c]
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x20], esp
call fcn.00403870
mov ecx, edi
mov edx, ebp
call fcn.004062f0
add esp, 8
push 0x578
call ebx
xor esi, esi
mov eax, dword [esp + 0x104]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x1c], esp
mov edi, esp
push eax
call fcn.00429de0
add eax, 0x10
mov dword [edi], eax
add esp, 4
mov eax, ebp
call fcn.00403f70
add esp, 4
cmp eax, 0x4a9
je case.0x40ec46.1002
push 0x12c
call ebx
inc esi
cmp esi, 0xa
jle 0x40f105
jmp case.0x40ec46.1002
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
lea eax, [esp + 0xa4]
push eax
mov eax, ebp
call fcn.004060f0
add esp, 4
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
mov eax, ebp
call fcn.004046f0
add esp, 4
test al, al
jne 0x40f26c
cmp dword [esp + 0xa0], 0x295
jne 0x40f26c
cmp dword [esp + 0xa4], 0x1a3
jne 0x40f26c
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
lea ecx, [esp + 0x54]
push ecx
mov eax, ebp
call fcn.00405d80
add esp, 8
cmp dword [esp + 0x50], 0
jne 0x40f1e7
mov eax, dword [esp + 0x54]
test eax, eax
je 0x40f21d
push 0
push 0
push ecx
lea eax, [esp + 0x110]
mov esi, esp
mov dword [esp + 0x24], esp
call fcn.00403870
mov esi, ebp
call fcn.00405f00
add esp, 0xc
push 0x12c
call ebx
xor eax, eax
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], eax
add eax, 0x178
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fsub qword [0x46f250]
call fcn.00450dd0
mov edi, eax
call fcn.0044bf34
cdq
mov ecx, 0xa
idiv ecx
mov esi, 5
sub esi, edx
call fcn.0044bf34
cdq
mov ecx, 0xa
idiv ecx
mov eax, 5
sub eax, edx
add eax, edi
lea edi, [esi + 0x247]
jmp 0x40ffea
push 0x18
push ecx
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x20], esp
call fcn.00403870
mov edi, ebp
call fcn.004054b0
add esp, 8
jmp case.0x40ec46.1002
mov edx, dword [esp + 0x10c]
mov eax, dword [esp + 0x104]
push edx
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x20], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
add esp, 4
mov ecx, ebp
mov dword [esi], eax
call fcn.00409040
add esp, 8
cmp edi, 0x14
ja 0x40f3da
mov esi, dword [esp + 0x30]
lea eax, [esi - 0x82]
cmp eax, 0x14
ja 0x40f3da
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
call fcn.0044bf34
cmp edi, 0xf
jge 0x40f301
mov eax, 0xf
sub eax, edi
lea ecx, [eax + eax*4]
add ecx, ecx
add ecx, ecx
jmp 0x40f305
mov ecx, dword [esp + 0x18]
cmp esi, 0xd
jge 0x40f31a
mov eax, 0xc
sub eax, esi
lea edx, [eax + eax*4]
add edx, edx
add edx, edx
jmp 0x40f31e
mov edx, dword [esp + 0x1c]
lea eax, [edi + edi*4]
add eax, eax
add eax, eax
mov edi, eax
mov eax, 0x159
sub eax, edi
sub eax, ecx
lea ecx, [esi + esi*4 - 0x28f]
lea ecx, [edx + ecx*4]
mov edx, dword [esp + 0x20]
add ecx, edx
push ecx
push ecx
lea edi, [eax + edx]
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x20], esp
call fcn.00403870
mov ecx, edi
mov edx, ebp
call fcn.004062f0
add esp, 8
push 0x5dc
call ebx
xor edi, edi
lea esp, [esp]
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
mov eax, ebp
call fcn.00403f70
add esp, 4
cmp eax, 0x476
je case.0x40ec46.1002
push 0x1f4
call ebx
inc edi
cmp edi, 0xc
jle 0x40f370
push 0x12c
call ebx
push 0xf0
push ecx
lea eax, [esp + 0x10c]
mov esi, esp
mov edi, 0x205
mov dword [esp + 0x20], esp
call fcn.00403870
mov ecx, edi
mov edx, ebp
call fcn.004062f0
add esp, 8
jmp case.0x40ec46.1002
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
lea edx, [esp + 0xd4]
push edx
mov eax, ebp
call fcn.004060f0
add esp, 4
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
mov eax, ebp
call fcn.004046f0
add esp, 4
test al, al
jne 0x40f26c
cmp dword [esp + 0xd0], 0x20e
jne 0x40f26c
cmp dword [esp + 0xd4], 0x1a3
jne 0x40f26c
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
lea eax, [esp + 0x74]
push eax
mov eax, ebp
call fcn.00405d80
add esp, 8
cmp dword [esp + 0x70], 0
jne 0x40f476
mov eax, dword [esp + 0x74]
test eax, eax
je 0x40f4ac
push 0
push 0
push ecx
lea eax, [esp + 0x110]
mov esi, esp
mov dword [esp + 0x24], esp
call fcn.00403870
mov esi, ebp
call fcn.00405f00
add esp, 0xc
push 0x12c
call ebx
xor eax, eax
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], eax
add eax, 0x178
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fsub qword [0x46f308]
call fcn.00450dd0
mov edi, eax
call fcn.0044bf34
cdq
mov ecx, 0xa
idiv ecx
mov esi, 5
sub esi, edx
call fcn.0044bf34
cdq
mov ecx, 0xa
idiv ecx
mov eax, 5
sub eax, edx
add eax, edi
lea edi, [esi + 0x82]
jmp 0x40ffea
mov edx, dword [esp + 0x10c]
mov eax, dword [esp + 0x104]
push edx
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x20], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
add esp, 4
mov ecx, ebp
mov dword [esi], eax
call fcn.00409040
lea eax, [edi - 0xb]
add esp, 8
cmp eax, 0xd
ja 0x40f5dc
mov ecx, dword [esp + 0x30]
add ecx, 0xffffff86
cmp ecx, 6
ja 0x40f5dc
call fcn.0044bf34
mov ecx, dword [esp + 0x30]
lea edx, [edi + edi*4]
add edx, edx
lea ecx, [ecx + ecx*4 - 0x235]
add edx, edx
add ecx, ecx
mov eax, 0x25d
sub eax, edx
mov edx, dword [esp + 0x20]
add ecx, ecx
lea ecx, [ecx + edx - 0x32]
mov edx, dword [esp + 0x24]
push ecx
push ecx
lea edi, [eax + edx]
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x20], esp
call fcn.00403870
mov ecx, edi
mov edx, ebp
call fcn.004062f0
add esp, 8
push 0x578
call ebx
xor edi, edi
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
mov eax, ebp
call fcn.00403f70
add esp, 4
cmp eax, 0x477
je case.0x40ec46.1002
push 0x15e
call ebx
inc edi
cmp edi, 5
jle 0x40f5a2
jmp case.0x40ec46.1002
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
lea eax, [esp + 0xc4]
push eax
mov eax, ebp
call fcn.004060f0
add esp, 4
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
mov eax, ebp
call fcn.004046f0
add esp, 4
test al, al
jne 0x40f26c
cmp dword [esp + 0xc0], 0x169
jne 0x40f26c
cmp dword [esp + 0xc4], 0x1a3
jne 0x40f26c
test edi, edi
jne 0x40f651
cmp dword [esp + 0x30], edi
je 0x40f681
xor edi, edi
push edi
push edi
push ecx
lea eax, [esp + 0x110]
mov esi, esp
mov dword [esp + 0x24], esp
call fcn.00403870
mov esi, ebp
call fcn.00405f00
add esp, 0xc
push 0x12c
call ebx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
lea ecx, [esp + 0x9c]
push ecx
mov eax, ebp
call fcn.00405d80
mov edx, dword [esp + 0xa0]
add edx, 0xc4
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
add esp, 8
fadd qword [0x46f300]
call fcn.00450dd0
mov edi, eax
mov eax, dword [esp + 0x9c]
add eax, 0x178
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fsub qword [0x46f2f8]
call fcn.00450dd0
mov dword [esp + 0x18], eax
call fcn.0044bf34
cdq
mov ecx, 0xa
idiv ecx
mov esi, 5
sub esi, edx
call fcn.0044bf34
cdq
mov ecx, 0xa
idiv ecx
mov eax, 5
add edi, esi
sub eax, edx
mov edx, dword [esp + 0x18]
add eax, edx
push eax
push ecx
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x20], esp
call fcn.00403870
mov ecx, edi
mov edx, ebp
call fcn.004062f0
add esp, 8
push 0x12c
call ebx
push 0x18
push ecx
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x20], esp
call fcn.00403870
mov edi, ebp
call fcn.004054b0
add esp, 8
push 0x12c
call ebx
mov eax, dword [esp + 0x98]
mov dword [esp + 0x38], eax
jmp case.0x40ec46.1002
mov edx, dword [esp + 0x10c]
mov eax, dword [esp + 0x104]
lea ecx, [esp + 0x90]
push ecx
push 1
push edx
push ebp
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x2c], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004091a0
add esp, 0x14
jmp case.0x40ec46.1002
sub eax, 0x4a9
je 0x40fd97
sub eax, 0x134
je 0x40fc05
sub eax, 5
jne case.0x40ec46.1002
lea eax, [edi - 0x37]
cmp eax, 0xa
ja 0x40facc
mov ecx, dword [esp + 0x30]
add ecx, 0xfffffff3
cmp ecx, 0xb
ja 0x40facc
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
lea edx, [esp + 0xac]
push edx
mov eax, ebp
call fcn.00405d80
add esp, 4
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
mov eax, ebp
call fcn.004046f0
add esp, 4
test al, al
jne 0x40f946
cmp dword [esp + 0xa8], 0x32
jne 0x40f946
cmp dword [esp + 0xac], 0xe6
jne 0x40f946
push 0x47e5d8
mov byte [esp + 0x3b], al
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [sym.imp.USER32.dll_GetForegroundWindow]
call esi
cmp eax, ebp
je 0x40f891
mov edi, dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x40f880
push ebp
call edi
call fcn.00408120
push eax
call ebx
call esi
cmp eax, ebp
jne 0x40f880
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
mov eax, ebp
call fcn.00406270
add esp, 4
cmp al, 1
je 0x40f8e6
push 0x113
push ecx
lea eax, [esp + 0x10c]
mov esi, esp
mov edi, 0x56
mov dword [esp + 0x20], esp
call fcn.00403870
mov ecx, edi
mov edx, ebp
call fcn.004062f0
add esp, 8
push 0x578
call ebx
mov bl, 1
jmp 0x40f8ea
mov bl, byte [esp + 0x37]
push 0x47e5d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp bl, 1
jne 0x40fabf
xor edi, edi
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
mov eax, ebp
call fcn.00403f70
add esp, 4
cmp eax, 0x444
je 0x40fabf
push 0x12c
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0xa
jle 0x40f900
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40e886
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
mov eax, ebp
call fcn.00406270
add esp, 4
cmp al, 1
je 0x40fabf
push 0x7a
push ecx
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x20], esp
call fcn.00403870
mov esi, ebp
call fcn.00405540
mov eax, dword [esp + 0x10c]
mov ebx, dword [eax + 0x64]
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push 0x46dcb8
call fcn.0042a2b0
push ecx
lea eax, [esp + 0x10c]
mov esi, esp
mov byte [esp + 0x104], 1
mov dword [esp + 0x24], esp
call fcn.00403870
lea ecx, [esp + 0x84]
push ecx
mov esi, ebp
mov byte [esp + 0x108], 0
call fcn.00408500
mov ebx, dword [esp + 0x88]
add esp, 0xc
test ebx, ebx
je 0x40fabb
mov eax, dword [esp + 0x80]
test eax, eax
je 0x40fabb
push ebx
push ecx
lea edi, [eax + 1]
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x20], esp
call fcn.00403870
mov ecx, edi
mov esi, ebp
call fcn.00407980
add esp, 8
push ebx
push ecx
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x20], esp
call fcn.00403870
mov ecx, dword [esp + 0x88]
mov esi, ebp
call fcn.00407980
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 8
xor edi, edi
push 0x12c
call ebx
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
lea edx, [esp + 0xbc]
push edx
mov eax, ebp
call fcn.00405d80
add esp, 4
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
mov eax, ebp
call fcn.004046f0
add esp, 4
test al, al
jne 0x40faa8
cmp dword [esp + 0xb8], 0x32
jne 0x40faa8
cmp dword [esp + 0xbc], 0xe6
je 0x40fabf
inc edi
cmp edi, 8
jle 0x40fa45
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40e886
mov dword [esp + 0x38], edi
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40e886
mov eax, dword [esp + 0x104]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x1c], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
mov dword [esi], eax
lea eax, [esp + 0xd0]
add esp, 4
push eax
mov eax, ebp
call fcn.004060f0
mov eax, dword [esp + 0x10c]
add esp, 4
add eax, 0xfffffff0
mov dword [esp + 0x1c], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
mov dword [esi], eax
add esp, 4
mov eax, ebp
call fcn.004046f0
add esp, 4
test al, al
jne 0x410044
cmp dword [esp + 0xc8], 0x188
jne 0x410044
cmp dword [esp + 0xcc], 0x1a3
jne 0x410044
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
lea ecx, [esp + 0x6c]
push ecx
mov eax, ebp
call fcn.00405d80
add esp, 8
cmp dword [esp + 0x68], 0
jne 0x40fb80
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x40fbb6
push 0
push 0
push ecx
lea eax, [esp + 0x110]
mov esi, esp
mov dword [esp + 0x24], esp
call fcn.00403870
mov esi, ebp
call fcn.00405f00
add esp, 0xc
push 0x12c
call ebx
xor eax, eax
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], eax
add eax, 0x178
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fsub qword [0x46f2f0]
call fcn.00450dd0
mov edi, eax
call fcn.0044bf34
cdq
mov ecx, 0xa
idiv ecx
mov esi, 5
sub esi, edx
call fcn.0044bf34
cdq
mov ecx, 0xa
idiv ecx
mov eax, 5
sub eax, edx
add eax, edi
lea edi, [esi + 0x149]
jmp 0x40ffea
mov edx, dword [esp + 0x10c]
mov eax, dword [esp + 0x104]
push edx
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x20], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
add esp, 4
mov ecx, ebp
mov dword [esi], eax
call fcn.00409040
add esp, 8
cmp edi, 0x10c
jl 0x40fc5e
cmp dword [esp + 0x30], 0x1e
jg 0x40fc5e
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
add eax, 0xfb
push eax
add esi, 0x25d
jmp 0x40fe7f
mov eax, dword [esp + 0x104]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x1c], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
lea ecx, [esp + 0xe0]
add esp, 4
mov dword [esi], eax
push ecx
mov eax, ebp
call fcn.004060f0
mov eax, dword [esp + 0x10c]
add esp, 4
add eax, 0xfffffff0
mov dword [esp + 0x1c], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
mov dword [esi], eax
add esp, 4
mov eax, ebp
call fcn.004046f0
add esp, 4
test al, al
jne 0x410044
cmp dword [esp + 0xd8], 0x2a0
jne 0x410044
cmp dword [esp + 0xdc], 0x1a3
jne 0x410044
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
lea edx, [esp + 0x5c]
push edx
mov eax, ebp
call fcn.00405d80
add esp, 8
cmp dword [esp + 0x58], 0
jne 0x40fd12
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x40fd48
push 0
push 0
push ecx
lea eax, [esp + 0x110]
mov esi, esp
mov dword [esp + 0x24], esp
call fcn.00403870
mov esi, ebp
call fcn.00405f00
add esp, 0xc
push 0x12c
call ebx
xor eax, eax
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], eax
add eax, 0x178
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fsub qword [0x46f240]
call fcn.00450dd0
mov edi, eax
call fcn.0044bf34
cdq
mov ecx, 0xa
idiv ecx
mov esi, 5
sub esi, edx
call fcn.0044bf34
cdq
mov ecx, 0xa
idiv ecx
mov eax, 5
sub eax, edx
add eax, edi
lea edi, [esi + 0x239]
jmp 0x40ffea
mov edx, dword [esp + 0x10c]
mov eax, dword [esp + 0x104]
push edx
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x20], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
add esp, 4
mov ecx, ebp
mov dword [esi], eax
call fcn.00409040
add esp, 8
cmp edi, 0x92
jl 0x40feb6
mov esi, dword [esp + 0x30]
cmp esi, 0x31
jl 0x40feb6
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], eax
call fcn.0044bf34
cmp edi, 0xf
jge 0x40fe07
mov eax, 0xf
sub eax, edi
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
mov dword [esp + 0x28], eax
cmp esi, 0xd
jge 0x40fe1e
mov eax, 0xc
sub eax, esi
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
mov dword [esp + 0x1c], eax
cmp edi, 0x90
jle 0x40fe38
mov eax, 0x90
sub eax, edi
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
mov dword [esp + 0x28], eax
cmp esi, 0x6a
jle 0x40fe4f
mov eax, 0x6a
sub eax, esi
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
mov dword [esp + 0x1c], eax
lea eax, [edi + edi*4]
add eax, eax
add eax, eax
mov ecx, eax
mov eax, 0xdb1
sub eax, ecx
mov ecx, dword [esp + 0x1c]
sub eax, dword [esp + 0x28]
lea edx, [esi + esi*4 - 0xd7]
lea ecx, [ecx + edx*4]
mov edx, dword [esp + 0x20]
add ecx, edx
push ecx
mov ecx, dword [esp + 0x28]
lea esi, [eax + ecx]
mov eax, dword [esp + 0x108]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x20], esp
mov edi, esp
push eax
call fcn.00429de0
add eax, 0x10
add esp, 4
mov ecx, esi
mov edx, ebp
mov dword [edi], eax
call fcn.004062f0
add esp, 8
push 0x578
call ebx
jmp case.0x40ec46.1002
mov eax, dword [esp + 0x104]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x1c], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
lea edx, [esp + 0xb8]
add esp, 4
mov dword [esi], eax
push edx
mov eax, ebp
call fcn.004060f0
mov eax, dword [esp + 0x10c]
add esp, 4
add eax, 0xfffffff0
mov dword [esp + 0x1c], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
mov dword [esi], eax
add esp, 4
mov eax, ebp
call fcn.004046f0
add esp, 4
test al, al
jne 0x410044
cmp dword [esp + 0xb0], 0x1e5
jne 0x410044
cmp dword [esp + 0xb4], 0x1a3
jne 0x410044
push ecx
lea eax, [esp + 0x108]
mov esi, esp
mov dword [esp + 0x1c], esp
call fcn.00403870
lea eax, [esp + 0x64]
push eax
mov eax, ebp
call fcn.00405d80
add esp, 8
cmp dword [esp + 0x60], 0
jne 0x40ff6a
mov eax, dword [esp + 0x64]
test eax, eax
je 0x40ffa0
push 0
push 0
push ecx
lea eax, [esp + 0x110]
mov esi, esp
mov dword [esp + 0x24], esp
call fcn.00403870
mov esi, ebp
call fcn.00405f00
add esp, 0xc
push 0x12c
call ebx
xor eax, eax
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], eax
add eax, 0x178
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fsub qword [0x46f238]
call fcn.00450dd0
mov edi, eax
call fcn.0044bf34
cdq
mov ecx, 0xa
idiv ecx
mov esi, 5
sub esi, edx
call fcn.0044bf34
cdq
mov ecx, 0xa
idiv ecx
mov eax, 5
sub eax, edx
add eax, edi
lea edi, [esi + 0x1e3]
push eax
push ecx
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x20], esp
call fcn.00403870
mov ecx, edi
mov edx, ebp
call fcn.004062f0
add esp, 8
push 0x12c
call ebx
push 0x18
push ecx
lea eax, [esp + 0x10c]
mov esi, esp
mov dword [esp + 0x20], esp
call fcn.00403870
mov edi, ebp
call fcn.004054b0
add esp, 8
push 0x12c
call ebx
mov dword [esp + 0x38], 0
jmp case.0x40ec46.1002
mov eax, dword [esp + 0x104]
push 0x18
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x20], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
add esp, 4
mov edi, ebp
mov dword [esi], eax
call fcn.004054b0
add esp, 8
jmp case.0x40ec46.1002
call fcn.00401ea0
lea ecx, [ecx]
push cs
invalid