Function at 0x1040ca50
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10470b70
mov eax, dword fs:[0]
push eax
sub esp, 0x860
mov eax, dword [0x11ad127c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x794], edi
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
imul esi, ecx, 0x7d0
mov dword [ebp - 0x740], ecx
mov dword [ebp - 0x764], eax
mov eax, dword [ebp + 0x1c]
push ecx
add esi, edi
mov dword [ebp - 0x780], eax
mov ecx, edi
mov dword [ebp - 0x7a0], esi
call fcn.10408d00
test al, al
jne 0x1040e75a
mov eax, dword [esi + 0x94]
test eax, eax
je 0x1040cae6
push eax
mov ecx, edi
call fcn.10408e40
test al, al
jne 0x1040cae6
push dword [ebp - 0x740]
mov ecx, edi
call fcn.1040ede0
jmp 0x1040e75a
push dword [ebp - 0x740]
mov ecx, edi
call fcn.10408d30
test al, al
je 0x1040e75a
mov eax, dword [esi + 0x50]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x750], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x7b0], eax
call eax
mov edx, dword [ebp - 0x750]
cmp edx, eax
sete byte [ebp - 0x742]
je 0x1040cb5c
cmp byte [edi + 0x1a91], 0
jne 0x1040cb5c
test edx, edx
jne 0x1040cb42
cmp byte [edi + 0x1ae9], dl
je 0x1040cb42
cmp byte [edi + 0x1a92], dl
jne 0x1040cb5c
lea eax, [esi + 0x5d]
mov byte [eax], 0
mov dword [ebp - 0x76c], eax
lea eax, [esi + 0x58]
mov dword [ebp - 0x778], eax
jmp 0x1040cc55
mov ecx, dword [esi + 0x50]
lea eax, [esi + 0x58]
mov dword [ebp - 0x778], eax
mov eax, dword [eax]
cmp dword [eax], 0x61030001
jne 0x1040e75a
cmp dword [ecx], 0x61030001
jne 0x1040e75a
cmp dword [ecx + 0x250], 0x61030001
lea eax, [ecx + 0x10]
jne 0x1040e75a
cmp dword [ecx + 0x260], 0x61010001
jne 0x1040e75a
cmp dword [eax], 0x61050001
jne 0x1040e75a
cmp dword [eax + 0x50], 0x61010001
jne 0x1040e75a
lea edi, [esi + 0x90]
mov ecx, 0x88
mov esi, eax
rep movsd dword es:[edi], dword [esi]
cmp dword [eax + 0xc], 2
mov esi, dword [ebp - 0x7a0]
mov edi, dword [ebp - 0x794]
setne al
cmp byte [ebp - 0x742], 0
mov byte [esi + 0x5f], al
jne 0x1040cc21
mov al, byte [edi + 0x1a91]
test al, al
jne 0x1040cbfa
test edx, edx
jne 0x1040cc19
cmp byte [edi + 0x1ae9], 0
je 0x1040cc19
cmp byte [edi + 0x1a92], 0
jne 0x1040cc10
test al, al
je 0x1040cc19
cmp byte [esi + 0xd5], 0
jne 0x1040cc21
lea eax, [esi + 0x5d]
mov byte [eax], 0
jmp 0x1040cc46
cmp byte [esi + 0x656], 0
lea eax, [esi + 0x5d]
mov dword [ebp - 0x76c], eax
mov byte [eax], 1
je 0x1040cc55
push dword [ebp - 0x740]
mov ecx, edi
call fcn.1040c7b0
lea eax, [esi + 0x5d]
lea edx, [esi + 0x58]
mov dword [ebp - 0x76c], eax
mov dword [ebp - 0x778], edx
xor cl, cl
mov byte [ebp - 0x741], cl
mov byte [ebp - 0x744], cl
cmp byte [edi + 0x1ab4], cl
jne 0x1040cd45
mov eax, dword [esi + 0x50]
lea edx, [esi + 0x750]
mov dword [ebp - 0x788], eax
cmp dword [ebp - 0x788], 0
mov eax, dword [ebp - 0x778]
mov eax, dword [eax]
mov dword [ebp - 0x750], eax
je 0x1040cd3d
test eax, eax
je 0x1040cd3d
mov eax, dword [ebp - 0x788]
mov eax, dword [eax + 0x6a4]
cmp dword [edx + 4], eax
je 0x1040cd0f
mov eax, dword [ebp - 0x750]
mov ecx, 2
add eax, 0x20
mov dword [ebp - 0x754], eax
xor eax, eax
mov edi, dword [ebp - 0x754]
lock cmpxchg dword [edi], ecx
mov edi, dword [ebp - 0x794]
test eax, eax
jne 0x1040cd09
mov esi, dword [ebp - 0x788]
mov ecx, 0x22
mov eax, dword [ebp - 0x754]
add esi, 0x6a0
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x794]
mov esi, dword [ebp - 0x7a0]
mov dword [eax], 0
mov cl, byte [ebp - 0x741]
mov al, byte [edx + 0x5c]
and al, 1
mov byte [ebp - 0x742], al
je 0x1040cd3f
cmp dword [edx + 0x84], 0
je 0x1040cd3f
call dword [ebp - 0x7b0]
cmp dword [esi + 0x7d4], eax
je 0x1040ce4c
mov cl, byte [ebp - 0x741]
xor al, al
mov byte [ebp - 0x744], al
mov eax, dword [ebp - 0x76c]
mov al, byte [eax]
test al, al
je 0x1040e739
lea eax, [esi + 8]
mov byte [ebp - 0x7d0], 0
push eax
mov dword [ebp - 0x7d4], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [edi + 0x1b58], 0
mov dword [edi + 0x1b5c], 0
mov dword [edi + 0x1b60], 0
mov dword [edi + 0x1b64], 0
mov dword [edi + 0x1b68], 0
mov dword [edi + 0x1b6c], 0
mov dword [edi + 0x1b70], 0
mov dword [edi + 0x1b74], 0
cmp byte [esi + 0xd5], 0
mov dword [ebp - 4], 0
je 0x1040ce5f
cmp byte [edi + 0x1ae9], 0
je 0x1040cdeb
cmp byte [edi + 0x1a92], 0
jne 0x1040ce5f
cmp byte [edi + 0x1a91], 0
jne 0x1040ce5f
call fcn.10410040
mov esi, dword [ebp - 0x740]
test al, al
je 0x1040ce16
push 1
push esi
lea ecx, [ebp - 0x86c]
call fcn.1040fda0
push 2
lea eax, [ebp - 0x86c]
push eax
call fcn.10410370
cmp byte [ebp - 0x741], 0
je 0x1040e72b
push esi
lea eax, [ebp - 0x744]
mov ecx, edi
push eax
push dword [ebp + 0x10]
push dword [ebp - 0x764]
call fcn.1040b7b0
push dword [ebp - 0x7d4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1040e75a
mov al, byte [ebp - 0x742]
mov cl, 1
mov byte [ebp - 0x741], cl
jmp 0x1040cd3f
cmp byte [edi + 0x1ab4], 0
jne 0x1040ce7c
mov eax, dword [esi + 0x54]
mov ecx, 1
lock xadd dword [eax + 0x14], ecx
inc ecx
mov dword [esi + 0x2e0], ecx
push dword [esi + 0xa4]
mov eax, dword [ebp + 0x18]
mov ecx, edi
push dword [esi + 0xa0]
mov dword [ebp - 0x75c], eax
push eax
mov eax, dword [ebp + 0x14]
push eax
push dword [ebp - 0x740]
mov dword [ebp - 0x760], eax
call fcn.1040c110
mov cl, byte [edi + 0x1ab4]
test al, al
jne 0x1040cedf
test cl, cl
jne 0x1040cecb
mov eax, dword [esi + 0x54]
mov ecx, 1
lock xadd dword [eax + 0x28], ecx
inc ecx
mov dword [esi + 0x2e8], ecx
call fcn.10410040
test al, al
je 0x1040e72b
push 2
jmp 0x1040d317
test cl, cl
je 0x1040ceec
mov byte [ebp - 0x74a], 0
jmp 0x1040cf29
mov esi, dword [esi + 0x54]
call dword [ebp - 0x7b0]
lea ecx, [esi + 0xb9e4]
xchg dword [ecx], eax
mov dword [ebp - 0x750], eax
test eax, eax
je 0x1040cf1c
call dword [ebp - 0x7b0]
mov byte [ebp - 0x74a], 1
cmp dword [ebp - 0x750], eax
jne 0x1040cf23
mov byte [ebp - 0x74a], 0
mov esi, dword [ebp - 0x7a0]
mov ecx, dword [ebp - 0x780]
test ecx, ecx
je 0x1040cf91
mov eax, dword [esi + 0x50]
mov dword [ebp - 0x750], eax
mov eax, dword [ebp - 0x778]
mov edx, dword [eax]
mov eax, 1
mov dword [ecx], 0x61010001
add edx, 0x1c
mov ecx, 2
lock cmpxchg dword [edx], ecx
cmp eax, 1
jne 0x1040cf91
mov ecx, dword [ebp - 0x750]
mov ecx, dword [ecx + 0x268]
test ecx, ecx
je 0x1040cf8b
mov eax, dword [ebp - 0x780]
mov eax, dword [eax + 0x14]
cmp eax, ecx
cmovbe eax, ecx
mov ecx, dword [ebp - 0x780]
mov dword [ecx + 0x14], eax
mov byte [ecx + 0x18], 1
mov dword [edx], 0
mov al, byte [edi + 0x1aeb]
mov ecx, dword [esi + 0x50]
mov edx, dword [esi + 0x54]
mov byte [ebp - 0x742], al
mov al, byte [edi + 0x1aed]
mov byte [ebp - 0x749], al
mov eax, dword [ebp - 0x778]
mov dword [ebp - 0x754], ecx
mov ecx, 2
mov byte [ebp - 0x7b4], 0
mov byte [ebp - 0x7b8], 0
mov eax, dword [eax]
add eax, 4
mov dword [ebp - 0x774], eax
mov eax, 1
mov edi, dword [ebp - 0x774]
lock cmpxchg dword [edi], ecx
cmp eax, 1
jne 0x1040d04b
mov ecx, dword [ebp - 0x754]
mov eax, dword [ecx + 0x258]
mov ecx, dword [ecx + 0x25c]
mov dword [esi + 0x2bc], ecx
mov ecx, dword [ebp - 0x754]
mov dword [esi + 0x2b8], eax
mov eax, dword [ecx + 0x250]
mov dword [esi + 0x2b0], eax
mov eax, edi
mov dword [eax], 0
mov eax, dword [esi + 0x2b8]
mov ecx, dword [esi + 0x2bc]
mov dword [edx + 0xb9d0], eax
mov dword [edx + 0xb9d4], ecx
mov eax, dword [esi + 0x2b0]
mov dword [edx + 0xb9c8], eax
jmp 0x1040d07f
cmp dword [edx + 0xb9c8], 0x61030001
jne 0x1040d07f
mov ecx, dword [edx + 0xb9d0]
mov eax, dword [edx + 0xb9d4]
cmp ecx, dword [esi + 0x2b8]
jne 0x1040d073
cmp eax, dword [esi + 0x2bc]
je 0x1040d07f
mov dword [esi + 0x2b8], ecx
mov dword [esi + 0x2bc], eax
mov eax, dword [esi + 0x2b8]
mov edi, dword [ebp - 0x794]
test eax, 0x20000000
je 0x1040d0fd
mov ecx, eax
and ecx, 0x3fff
cmp ecx, dword [esi + 0xa0]
ja 0x1040d0fd
shr eax, 0xe
and eax, 0x3fff
cmp eax, dword [esi + 0xa4]
ja 0x1040d0fd
cmp dword [edi + 0x1a9c], ecx
jne 0x1040d0d7
cmp dword [edi + 0x1aa0], eax
jne 0x1040d0d7
mov eax, dword [esi + 0x2bc]
test al, 1
je 0x1040d0fd
shr eax, 1
and eax, 0x3fff
cmp eax, ecx
jae 0x1040d0fd
mov ecx, dword [esi + 0x2b8]
mov al, 1
mov byte [ebp - 0x77c], al
mov eax, ecx
shr eax, 0x1e
and al, 1
shr ecx, 0x1f
mov byte [ebp - 0x7b4], al
mov byte [ebp - 0x7b8], cl
jmp 0x1040d105
xor al, al
mov byte [ebp - 0x77c], al
mov eax, dword [ebp - 0x77c]
mov ecx, edi
push eax
push dword [ebp - 0x75c]
push dword [ebp - 0x760]
push dword [ebp - 0x740]
call fcn.1040eab0
test al, al
jne 0x1040d159
cmp byte [edi + 0x1ab4], al
jne 0x1040d145
mov eax, dword [esi + 0x54]
mov ecx, 1
lock xadd dword [eax + 0x28], ecx
inc ecx
mov dword [esi + 0x2e8], ecx
call fcn.10410040
test al, al
je 0x1040e72b
push 3
jmp 0x1040d317
cmp byte [esi + 0x5c], 0
je 0x1040d2c2
mov eax, dword [ebp - 0x778]
mov ecx, 2
mov edx, dword [eax]
mov eax, 1
add edx, 8
mov dword [ebp - 0x754], edx
lock cmpxchg dword [edx], ecx
cmp eax, 1
jne 0x1040d1f6
lea eax, [ebp - 0x73c]
mov ecx, edi
push eax
push dword [ebp - 0x740]
call fcn.1040ad20
test al, al
jne 0x1040d1ce
mov eax, dword [ebp - 0x754]
mov ecx, edi
mov esi, dword [ebp - 0x740]
push esi
mov dword [eax], 1
call fcn.1040fa60
call fcn.10410040
test al, al
je 0x1040e72b
push 4
push esi
jmp 0x1040d31d
lea eax, [ebp - 0x73c]
push eax
mov eax, dword [ebp - 0x740]
mov ecx, dword [edi + eax*4 + 0xfb0]
call fcn.10411da0
xor ecx, ecx
test al, al
mov eax, dword [ebp - 0x754]
sete cl
mov dword [eax], ecx
mov eax, dword [esi + 0x50]
mov edi, 2
mov edx, dword [esi + 0x54]
mov dword [ebp - 0x754], eax
mov eax, dword [ebp - 0x778]
mov dword [ebp - 0x750], edx
mov ecx, dword [eax]
mov eax, 1
add ecx, 0x10
mov dword [ebp - 0x784], ecx
lock cmpxchg dword [ecx], edi
mov edi, dword [ebp - 0x794]
cmp eax, 1
jne 0x1040d2c2
mov eax, dword [ebp - 0x754]
mov edx, dword [edx + 0x2c]
cmp edx, dword [eax + 0x5a0]
je 0x1040d2bc
mov ecx, dword [ebp - 0x740]
mov esi, eax
add ecx, 0x3ec
mov dword [ebp - 0x748], 0x64
lea ecx, [edi + ecx*4]
mov dword [ebp - 0x774], ecx
nop dword [eax + eax]
movzx eax, byte [edi + 0x1ab4]
mov ecx, dword [ecx]
push eax
push dword [esi + edx*8 + 0x284]
push dword [esi + edx*8 + 0x280]
call fcn.10411680
mov ecx, dword [ebp - 0x750]
xor edx, edx
mov eax, dword [ecx + 0x2c]
inc eax
div dword [ebp - 0x748]
mov dword [ecx + 0x2c], edx
mov ecx, dword [ebp - 0x774]
cmp edx, dword [esi + 0x5a0]
jne 0x1040d270
mov esi, dword [ebp - 0x7a0]
mov ecx, dword [ebp - 0x784]
mov dword [ecx], 0
mov eax, dword [esi + 0x50]
mov dword [ebp - 0x750], eax
mov eax, dword [ebp - 0x750]
cmp dword [eax + 0x240], 0
jne 0x1040d347
cmp byte [edi + 0x1ab4], 0
jne 0x1040d308
mov eax, dword [esi + 0x54]
mov dword [eax + 0x14], 0
mov dword [esi + 0x2e0], 0
mov dword [eax + 0x28], 0
mov dword [esi + 0x2e8], 0
call fcn.10410040
test al, al
je 0x1040e72b
push 6
push dword [ebp - 0x740]
lea ecx, [ebp - 0x86c]
call fcn.1040fda0
push 2
lea eax, [ebp - 0x86c]
push eax
call fcn.10410370
push dword [ebp - 0x7d4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1040e75a
cmp byte [edi + 0x1ae8], 0
mov dword [ebp - 0x780], 0
mov dword [ebp - 0x7bc], 0
mov dword [ebp - 0x798], 0
mov dword [ebp - 0x78c], 0
mov dword [ebp - 0x768], 0
je 0x1040d386
mov al, 1
jmp 0x1040d3a5
mov eax, dword [esi + 0x50]
mov dword [ebp - 0x750], eax
mov eax, dword [ebp - 0x750]
cmp dword [eax + 0x248], 0
setne al
mov byte [edi + 0x1ae8], al
cmp byte [ebp - 0x77c], 0
mov byte [ebp - 0x774], al
mov byte [ebp - 0x743], al
jne 0x1040d406
mov ecx, dword [ebp - 0x760]
cmp ecx, dword [esi + 0xa0]
ja 0x1040d3d6
mov ecx, dword [ebp - 0x75c]
cmp ecx, dword [esi + 0xa4]
jbe 0x1040d406
mov eax, dword [esi + 0x54]
mov ecx, edi
mov esi, dword [ebp - 0x740]
push esi
mov dword [eax + 0xb9dc], 0xfffffffc
call fcn.1040fa60
call fcn.10410040
test al, al
je 0x1040e72b
push 7
push esi
jmp 0x1040d31d
mov eax, dword [esi + 0x50]
mov eax, dword [eax + 0x264]
mov dword [esi + 0x2c4], eax
cmp byte [edi + 0x1ab4], 0
jne 0x1040d433
test eax, eax
jns 0x1040d433
and eax, 0x7fffffff
mov ecx, 0x1f4
cmp eax, ecx
cmovb ecx, eax
jmp 0x1040d435
xor ecx, ecx
mov edx, 0x2ec
mov byte [ebp - 0x76c], 0
mov eax, esi
mov dword [edx + eax], ecx
cmp byte [edi + 0x1ab4], 0
jne 0x1040d468
cmp byte [ebp - 0x742], 0
je 0x1040d468
cmp byte [ebp - 0x749], 0
mov byte [ebp - 0x770], 1
je 0x1040d46f
mov byte [ebp - 0x770], 0
mov eax, dword [esi + 0x50]
mov dword [ebp - 0x750], eax
mov eax, dword [ebp - 0x750]
cmp dword [eax + 0x244], 0
jne 0x1040d494
cmp byte [esi + 0x5e], 0
mov byte [ebp - 0x741], 0
je 0x1040d49b
mov byte [ebp - 0x741], 1
mov ecx, dword [esi + 0x9c]
lea edx, [esi + 8]
mov al, byte [edi + 0x1ab4]
test ecx, ecx
mov dword [ebp - 0x79c], ecx
sete byte [ebp - 0x750]
mov byte [ebp - 0x755], 0
mov byte [ebp - 0x756], 0
mov byte [ebp - 0x749], 0
test al, al
jne 0x1040d506
cmp byte [edx + 0xd0], al
je 0x1040d4e2
cmp byte [ebp - 0x74a], al
je 0x1040d506
cmp byte [edx + 0xce], 0
jne 0x1040d4fd
cmp byte [edx + 0xd2], 0
jne 0x1040d4fd
cmp byte [edx + 0xd1], 0
je 0x1040d506
mov byte [ebp - 0x742], 1
jmp 0x1040d511
mov byte [ebp - 0x742], 0
test al, al
jne 0x1040d536
cmp byte [edx + 0xce], 0
jne 0x1040d51f
cmp ecx, 2
jne 0x1040d536
mov ecx, edi
call fcn.1040bf90
push dword [ebp - 0x740]
mov ecx, edi
call fcn.1040bc60
lea edx, [esi + 8]
mov cl, byte [edi + 0x1ab4]
test cl, cl
je 0x1040d5d0
cmp byte [esi + 0x5c], 0
je 0x1040d5d0
cmp byte [esi + 0x89], 0
je 0x1040d5d0
mov eax, dword [esi + 0x80]
cmp eax, dword [esi + 0x2b8]
jne 0x1040d5d0
mov eax, dword [esi + 0x84]
cmp eax, dword [esi + 0x2bc]
jne 0x1040d5d0
cmp dword [esi + 0x7c], 0
jbe 0x1040d582
cmp byte [esi + 0x88], 0
jne 0x1040d5d0
mov al, byte [ebp - 0x741]
cmp byte [esi + 0x88], al
jne 0x1040d5d0
cmp byte [edx + 0xd3], 0
mov eax, dword [edx + 0x60]
mov eax, dword [edx + eax*4 + 0x3e4]
mov dword [ebp - 0x754], eax
mov eax, dword [esi + 0x74]
mov dword [ebp - 0x760], eax
mov eax, dword [esi + 0x78]
mov dword [ebp - 0x75c], eax
je 0x1040e1a9
push dword [esi + 0x638]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x1040e1a9
push ecx
lea ecx, [edi + 0xfd8]
call fcn.1040f0c0
cmp byte [ebp - 0x742], 0
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x790], eax
je 0x1040d6f9
mov eax, dword [ebp - 0x760]
mov ecx, edi
push dword [ebp - 0x740]
mov dword [ebp - 0x7dc], eax
mov eax, dword [ebp - 0x75c]
mov dword [ebp - 0x7e4], 0
mov dword [ebp - 0x7e0], 0
mov dword [ebp - 0x7d8], eax
call fcn.1040bc60
cmp byte [ebp - 0x743], 0
lea ecx, [ebp - 0x7e4]
mov dword [ebp - 0x754], eax
je 0x1040d671
push 0xff000000
push ecx
push 0
push eax
lea ecx, [edi + 0xfd8]
call fcn.1040c760
mov dword [ebp - 0x748], eax
test eax, eax
jns 0x1040d6d9
call fcn.10410040
test al, al
je 0x1040d6d9
push dword [ebp - 0x748]
push 7
jmp 0x1040d6ba
push dword [ebp - 0x770]
push 1
push 0
push 0
push ecx
push dword [ebp - 0x790]
lea ecx, [ebp - 0x7e4]
push dword [ebp - 0x764]
push ecx
push 0
push eax
lea ecx, [edi + 0xfd8]
call fcn.1040c6e0
mov dword [ebp - 0x748], eax
test eax, eax
jns 0x1040d6d9
call fcn.10410040
test al, al
je 0x1040d6d9
push dword [ebp - 0x748]
push 5
push dword [ebp - 0x740]
lea ecx, [ebp - 0xd0]
call fcn.1040fb30
push 4
lea eax, [ebp - 0xd0]
push eax
call fcn.10410370
cmp byte [ebp - 0x744], 0
je 0x1040d6f9
push dword [ebp - 0x740]
mov ecx, edi
push 0
push 0
push dword [ebp - 0x754]
call fcn.1040c630
cmp dword [ebp - 0x79c], 2
jne 0x1040d816
cmp byte [esi + 0xda], 0
je 0x1040d72e
cmp byte [edi + 0x1ab4], 0
mov al, byte [esi + 0xdb]
je 0x1040d76f
test al, al
je 0x1040d72e
push dword [esi + 0x638]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
cmp byte [ebp - 0x74a], 0
je 0x1040d7ab
mov edx, dword [ebp - 0x740]
mov ecx, dword [edi + 0x1b54]
mov eax, dword [edi + 0x1b50]
push 0
mov dword [edi + edx*8 + 0x1adc], ecx
mov ecx, edi
push 0
mov dword [edi + edx*8 + 0x1ad8], eax
push edx
mov byte [esi + 0x89], 0
call fcn.1040e780
jmp 0x1040e722
mov byte [ebp - 0x749], 1
test al, al
je 0x1040d788
push dword [esi + 0x638]
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x1040d72e
cmp byte [ebp - 0x74a], 0
jne 0x1040d737
push 0
push dword [esi + 0x634]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1040d816
mov byte [ebp - 0x749], al
jmp 0x1040d7b4
cmp byte [ebp - 0x749], 0
jne 0x1040d816
lea eax, [ebp - 0x780]
mov ecx, edi
push eax
lea eax, [ebp - 0x756]
push eax
lea eax, [ebp - 0x7bc]
push eax
push dword [ebp - 0x740]
call fcn.1040bb10
mov dword [ebp - 0x78c], eax
test eax, eax
jne 0x1040d816
mov esi, dword [ebp - 0x740]
mov ecx, edi
push esi
call fcn.1040fa60
call fcn.10410040
test al, al
je 0x1040e722
push 8
push esi
lea ecx, [ebp - 0x70]
call fcn.1040fda0
push 2
lea eax, [ebp - 0x70]
push eax
call fcn.10410370
jmp 0x1040e722
lea eax, [ebp - 0x7ac]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [ebp - 0x7ac]
mov ecx, dword [ebp - 0x7a8]
mov dword [edi + 0x1b58], eax
lea eax, [ebp - 0x768]
push eax
lea eax, [ebp - 0x7a8]
mov dword [edi + 0x1b5c], ecx
push eax
lea eax, [ebp - 0x798]
mov dword [ebp - 0x7a8], 0
push eax
push dword [ebp - 0x740]
mov ecx, edi
call fcn.1040b920
mov dword [ebp - 0x754], eax
lea eax, [ebp - 0x7fc]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp - 0x7f8]
mov ecx, dword [ebp - 0x7fc]
mov dword [edi + 0x1b64], edx
mov edx, dword [ebp - 0x798]
mov dword [edi + 0x1b60], ecx
test edx, edx
jne 0x1040d8d2
mov esi, dword [ebp - 0x740]
mov ecx, edi
push esi
call fcn.1040fa60
call fcn.10410040
test al, al
je 0x1040e722
push 9
push esi
lea ecx, [ebp - 0x70]
call fcn.1040fda0
push 2
lea eax, [ebp - 0x70]
push eax
call fcn.10410370
jmp 0x1040e722
cmp byte [ebp - 0x77c], 0
xorps xmm0, xmm0
mov eax, dword [ebp - 0x760]
mov ecx, dword [esi + 0x2b8]
mov dword [ebp - 0x7c4], eax
mov eax, dword [ebp - 0x75c]
mov dword [ebp - 0x7c0], eax
mov eax, dword [esi + 0x2bc]
movups xmmword [ebp - 0x850], xmm0
mov dword [ebp - 0x830], 0
movups xmmword [ebp - 0x840], xmm0
mov dword [ebp - 0x788], 0
mov dword [ebp - 0x7cc], 0
mov dword [ebp - 0x7c8], 0
mov word [esi + 0x88], 0
mov dword [esi + 0x80], ecx
mov dword [esi + 0x84], eax
mov dword [esi + 0x7c], 0
jne 0x1040d971
mov ecx, dword [ebp - 0x79c]
test ecx, ecx
je 0x1040dd81
cmp byte [ebp - 0x770], 0
je 0x1040dfcb
jmp 0x1040d993
mov eax, ecx
shr ecx, 0xe
and eax, 0x3fff
and ecx, 0x3fff
mov dword [ebp - 0x7c0], ecx
mov ecx, dword [ebp - 0x79c]
mov dword [ebp - 0x7c4], eax
cmp byte [ebp - 0x743], 0
jne 0x1040da07
mov eax, dword [ebp - 0x7a8]
mov dword [ebp - 0x748], edx
mov dword [ebp - 0x784], eax
test ecx, ecx
je 0x1040d9c8
mov eax, dword [esi + 0x464]
mov dword [ebp - 0x748], eax
mov dword [ebp - 0x784], 0
lea eax, [ebp - 0x755]
mov ecx, edi
push eax
lea eax, [ebp - 0x7cc]
push eax
push dword [ebp - 0x740]
call fcn.1040bd40
test al, al
je 0x1040da07
lea eax, [ebp - 0x7cc]
mov ecx, edi
push eax
push dword [ebp - 0x784]
push dword [ebp - 0x748]
push dword [ebp - 0x740]
call fcn.1040a8d0
cmp byte [ebp - 0x741], 0
je 0x1040dbd3
push 1
lea eax, [ebp - 0x850]
mov ecx, edi
push eax
call fcn.1040f1c0
test al, al
je 0x1040dbd3
mov eax, dword [ebp - 0x760]
mov ecx, edi
mov dword [ebp - 0x7ec], eax
mov eax, dword [ebp - 0x75c]
mov dword [ebp - 0x7f4], 0
mov dword [ebp - 0x7f0], 0
mov dword [ebp - 0x7e8], eax
call fcn.1040bf90
cmp byte [ebp - 0x743], 0
lea ecx, [ebp - 0x7f4]
mov dword [ebp - 0x784], eax
je 0x1040daa9
push 0xff000000
push ecx
push 0
push eax
lea ecx, [edi + 0xfd8]
call fcn.1040c760
mov dword [ebp - 0x748], eax
test eax, eax
jns 0x1040db19
call fcn.10410040
test al, al
je 0x1040db19
push dword [ebp - 0x748]
push 7
jmp 0x1040dafa
push dword [ebp - 0x770]
push 0
push dword [ebp - 0x7b8]
push dword [ebp - 0x7b4]
push ecx
push dword [ebp - 0x790]
lea ecx, [ebp - 0x7f4]
push dword [ebp - 0x764]
push ecx
push 0
push eax
lea ecx, [edi + 0xfd8]
call fcn.1040c6e0
mov dword [ebp - 0x748], eax
test eax, eax
jns 0x1040db19
call fcn.10410040
test al, al
je 0x1040db19
push dword [ebp - 0x748]
push 5
push dword [ebp - 0x740]
lea ecx, [ebp - 0x1a8]
call fcn.1040fb30
push 4
lea eax, [ebp - 0x1a8]
push eax
call fcn.10410370
cmp byte [ebp - 0x744], 0
je 0x1040db3e
push dword [ebp - 0x740]
lea eax, [ebp - 0x744]
mov ecx, edi
push eax
push 0
push dword [ebp - 0x784]
call fcn.1040c630
lea eax, [ebp - 0x850]
push eax
push 0
push dword [ebp - 0x784]
lea ecx, [edi + 0xfd8]
call fcn.1040c5d0
mov dword [ebp - 0x748], eax
test eax, eax
jns 0x1040db92
call fcn.10410040
test al, al
je 0x1040db92
push dword [ebp - 0x748]
lea ecx, [ebp - 0x238]
push 6
push dword [ebp - 0x740]
call fcn.1040fb30
push 4
lea eax, [ebp - 0x238]
push eax
call fcn.10410370
mov ecx, dword [ebp - 0x784]
xor dl, dl
xor al, al
mov dword [ebp - 0x764], ecx
xor ecx, ecx
mov byte [esi + 0x88], 1
mov byte [ebp - 0x76c], 1
mov byte [ebp - 0x741], 0
mov byte [ebp - 0x743], dl
mov byte [ebp - 0x774], dl
mov byte [ebp - 0x770], al
mov dword [ebp - 0x790], ecx
jmp 0x1040dbe5
mov dl, byte [ebp - 0x743]
mov ecx, dword [ebp - 0x790]
mov al, byte [ebp - 0x770]
cmp dword [ebp - 0x79c], 0
je 0x1040dd37
cmp byte [ebp - 0x77c], 0
jne 0x1040dc03
test al, al
je 0x1040dfcb
test dl, dl
je 0x1040dc75
push 0xff000000
lea eax, [ebp - 0x7cc]
push eax
push 0
push dword [esi + 0x464]
lea ecx, [edi + 0xfd8]
call fcn.1040c760
mov dword [ebp - 0x748], eax
test eax, eax
jns 0x1040dd2d
call fcn.10410040
test al, al
je 0x1040dd2d
push dword [ebp - 0x748]
lea ecx, [ebp - 0x160]
push 7
push dword [ebp - 0x740]
call fcn.1040fb30
push 4
lea eax, [ebp - 0x160]
push eax
call fcn.10410370
mov eax, dword [esi + 0x464]
xor ecx, ecx
jmp 0x1040dd3d
push dword [ebp - 0x770]
mov eax, dword [edi + 0x1a9c]
push 0
push dword [ebp - 0x7b8]
mov dword [ebp - 0x28], eax
push dword [ebp - 0x7b4]
mov eax, dword [edi + 0x1aa0]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x30]
push eax
push ecx
push dword [ebp - 0x764]
lea eax, [ebp - 0x7cc]
mov dword [ebp - 0x30], 0
push eax
push 0
push dword [esi + 0x464]
lea ecx, [edi + 0xfd8]
mov dword [ebp - 0x2c], 0
call fcn.1040c6e0
mov dword [ebp - 0x748], eax
test eax, eax
jns 0x1040dd08
call fcn.10410040
test al, al
je 0x1040dd08
push dword [ebp - 0x748]
lea ecx, [ebp - 0x160]
push 5
push dword [ebp - 0x740]
call fcn.1040fb30
push 4
lea eax, [ebp - 0x160]
push eax
call fcn.10410370
cmp byte [ebp - 0x755], 0
je 0x1040dd2d
lea eax, [ebp - 0x7cc]
mov ecx, edi
push eax
push 0
push dword [esi + 0x464]
push dword [ebp - 0x740]
call fcn.1040e900
mov eax, dword [esi + 0x464]
xor ecx, ecx
jmp 0x1040dd3d
mov eax, dword [ebp - 0x764]
cmp byte [ebp - 0x77c], 0
mov dword [ebp - 0x790], ecx
mov dword [ebp - 0x764], eax
je 0x1040dd74
mov eax, dword [esi + 0x2b8]
mov edx, eax
and edx, 0x3fff
shr eax, 0xe
and eax, 0x3fff
mov dword [ebp - 0x760], edx
mov dword [ebp - 0x75c], eax
cmp dword [ebp - 0x79c], 0
jne 0x1040dfcb
lea eax, [edi + 0x1af8]
mov ecx, edi
push eax
push dword [ebp - 0x75c]
push dword [ebp - 0x760]
push dword [ebp - 0x740]
call fcn.1040f2e0
cmp byte [ebp - 0x741], 0
je 0x1040ddd0
push 1
lea eax, [ebp - 0x850]
mov ecx, edi
push eax
call fcn.1040f1c0
test al, al
lea ecx, [ebp - 0x850]
mov eax, 0
cmove ecx, eax
mov dword [ebp - 0x788], ecx
cmp byte [ebp - 0x743], 0
lea ecx, [edi + 0xfd8]
je 0x1040de43
push 0xff000000
lea eax, [ebp - 0x7cc]
push eax
push dword [ebp - 0x7a8]
push dword [ebp - 0x798]
call fcn.1040c760
mov dword [ebp - 0x748], eax
test eax, eax
jns 0x1040df02
call fcn.10410040
test al, al
je 0x1040df02
push dword [ebp - 0x748]
lea ecx, [ebp - 0x118]
push 7
push dword [ebp - 0x740]
call fcn.1040fb30
push 4
lea eax, [ebp - 0x118]
push eax
call fcn.10410370
jmp 0x1040df02
push dword [ebp - 0x770]
mov eax, dword [edi + 0x1a9c]
push 0
push dword [ebp - 0x7b8]
mov dword [ebp - 0x18], eax
push dword [ebp - 0x7b4]
mov eax, dword [edi + 0x1aa0]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x790]
lea eax, [ebp - 0x7cc]
mov dword [ebp - 0x20], 0
push dword [ebp - 0x764]
mov dword [ebp - 0x1c], 0
push eax
push dword [ebp - 0x7a8]
push dword [ebp - 0x798]
call fcn.1040c6e0
mov dword [ebp - 0x748], eax
test eax, eax
jns 0x1040ded9
call fcn.10410040
test al, al
je 0x1040ded9
push dword [ebp - 0x748]
lea ecx, [ebp - 0x118]
push 5
push dword [ebp - 0x740]
call fcn.1040fb30
push 4
lea eax, [ebp - 0x118]
push eax
call fcn.10410370
cmp byte [ebp - 0x755], 0
je 0x1040df02
lea eax, [ebp - 0x7cc]
mov ecx, edi
push eax
push dword [ebp - 0x7a8]
push dword [ebp - 0x798]
push dword [ebp - 0x740]
call fcn.1040e900
cmp byte [ebp - 0x744], 0
je 0x1040df2b
push dword [ebp - 0x740]
lea eax, [ebp - 0x744]
mov ecx, edi
push eax
push dword [ebp - 0x7a8]
push dword [ebp - 0x798]
call fcn.1040c630
mov eax, dword [ebp - 0x788]
test eax, eax
je 0x1040df8e
push eax
push dword [ebp - 0x7a8]
lea ecx, [edi + 0xfd8]
push dword [ebp - 0x798]
call fcn.1040c5d0
mov dword [ebp - 0x748], eax
test eax, eax
jns 0x1040df87
call fcn.10410040
test al, al
je 0x1040df87
push dword [ebp - 0x748]
lea ecx, [ebp - 0x1f0]
push 6
push dword [ebp - 0x740]
call fcn.1040fb30
push 4
lea eax, [ebp - 0x1f0]
push eax
call fcn.10410370
mov byte [ebp - 0x76c], 1
mov ecx, dword [esi + 0x68]
mov eax, dword [esi + 0x468]
shl ecx, 4
mov dword [edi + 0x1a78], ecx
mov dword [edi + 0x1a64], eax
mov dword [edi + 0x1a7c], 1
mov ecx, dword [esi + 0x68]
mov eax, dword [esi + 0x470]
add ecx, 0x14
shl ecx, 4
mov dword [edi + 0x1a6c], eax
mov dword [edi + 0x1a74], ecx
mov ecx, dword [esi + 0x68]
mov eax, dword [esi + 0x470]
shl ecx, 4
cmp dword [ebp - 0x78c], 0
mov dword [edi + 0x1a68], eax
setne al
mov dword [edi + 0x1a70], ecx
movzx eax, al
mov ecx, edi
push eax
push dword [ebp - 0x750]
push dword [ebp - 0x740]
call fcn.1040e780
test al, al
je 0x1040e722
cmp dword [ebp - 0x79c], 0
je 0x1040e174
mov ecx, dword [edi + 0xfd4]
push dword [ebp - 0x764]
mov eax, dword [ecx]
mov eax, dword [eax]
call eax
mov esi, eax
mov ecx, edi
lea eax, [edi + 0x1af8]
push eax
push dword [ebp - 0x75c]
push dword [ebp - 0x760]
push dword [ebp - 0x740]
call fcn.1040f2e0
cmp byte [ebp - 0x741], 0
je 0x1040e07d
push 0
lea eax, [ebp - 0x850]
mov ecx, edi
push eax
call fcn.1040f1c0
test al, al
je 0x1040e07d
lea eax, [ebp - 0x850]
mov byte [ebp - 0x76c], 1
mov dword [ebp - 0x788], eax
cmp dword [edi + 0xfd8], 0
mov edx, dword [ebp - 0x7a0]
jne 0x1040e09a
mov eax, dword [edx + 0x474]
mov dword [ebp - 0x748], eax
jmp 0x1040e0a4
mov dword [ebp - 0x748], 0
mov ecx, dword [edx + 0x68]
movzx eax, byte [edi + 0x1ab4]
push eax
shl ecx, 4
push ecx
lea eax, [ecx + 0x140]
push eax
mov eax, dword [ebp - 0x788]
push ecx
push dword [edx + 0x46c]
push dword [edx + 0x474]
push dword [ebp - 0x748]
push eax
push 0xff000000
push dword [ebp - 0x774]
push dword [ebp - 0x75c]
push dword [ebp - 0x760]
push dword [ebp - 0x768]
push dword [ebp - 0x754]
push dword [ebp - 0x790]
push esi
mov esi, dword [ebp - 0x740]
push dword [ebp - 0x764]
mov ecx, dword [edi + esi*4 + 0xfb0]
call fcn.104117a0
test al, al
jne 0x1040e16e
call fcn.10410040
test al, al
je 0x1040e139
push 0xa
push esi
lea ecx, [ebp - 0x70]
call fcn.1040fda0
push 2
lea eax, [ebp - 0x70]
push eax
call fcn.10410370
push esi
mov ecx, edi
call fcn.1040f140
cmp dword [ebp - 0x78c], 0
je 0x1040e161
push esi
mov ecx, edi
call fcn.1040f180
mov ecx, dword [ebp - 0x7a0]
mov eax, dword [ecx + 0x54]
add eax, 0x24
lock inc dword [eax]
push esi
mov ecx, edi
call fcn.1040fa60
jmp 0x1040e722
mov esi, dword [ebp - 0x7a0]
cmp byte [edi + 0x1ab4], 0
jne 0x1040e19d
mov edx, dword [ebp - 0x740]
mov eax, dword [edi + 0x1b50]
mov ecx, dword [edi + 0x1b54]
mov dword [edi + edx*8 + 0x1ad8], eax
mov dword [edi + edx*8 + 0x1adc], ecx
mov al, byte [ebp - 0x76c]
mov byte [esi + 0x88], al
cmp dword [ebp - 0x79c], 2
mov byte [esi + 0x89], 1
jne 0x1040e263
cmp byte [ebp - 0x749], 0
mov eax, dword [ebp - 0x760]
mov dword [esi + 0x74], eax
mov eax, dword [ebp - 0x75c]
mov dword [esi + 0x78], eax
jne 0x1040e722
lea eax, [ebp - 0x7a4]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
cmp dword [ebp - 0x78c], 0
mov eax, dword [ebp - 0x7a4]
mov ecx, dword [ebp - 0x7a0]
mov dword [edi + 0x1b68], eax
mov dword [edi + 0x1b6c], ecx
jne 0x1040e232
lea eax, [ebp - 0x780]
mov ecx, edi
push eax
lea eax, [ebp - 0x756]
push eax
lea eax, [ebp - 0x7bc]
push eax
push dword [ebp - 0x740]
call fcn.1040bb10
mov dword [ebp - 0x78c], eax
cmp byte [ebp - 0x756], 0
je 0x1040e255
movzx eax, byte [edi + 0x1ab4]
push eax
mov eax, dword [ebp - 0x740]
mov ecx, dword [edi + eax*4 + 0xfb0]
call fcn.10411ce0
cmp dword [ebp - 0x78c], 0
jne 0x1040e270
jmp 0x1040d7e0
cmp dword [ebp - 0x78c], 0
je 0x1040e6b8
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [ebp - 0x804]
mov ecx, dword [ebp - 0x800]
mov dword [edi + 0x1b70], eax
mov dword [edi + 0x1b74], ecx
mov eax, dword [esi + 0x2b8]
mov ecx, dword [esi + 0x54]
and eax, 0x20000000
mov edx, dword [esi + 0x68]
mov dword [ebp - 0x774], eax
lea eax, [esi + 0x2bc]
mov dword [ebp - 0x750], ecx
je 0x1040e2ce
test byte [eax], 1
mov dword [ebp - 0x768], eax
je 0x1040e2ce
mov byte [ebp - 0x742], 1
jmp 0x1040e2db
mov byte [ebp - 0x742], 0
mov dword [ebp - 0x768], eax
imul eax, dword [esi + 0x6c], 0x1108
add ecx, eax
mov dword [ebp - 0x748], ecx
mov ecx, dword [ebp - 0x750]
mov dword [eax + ecx + 0xfa8], edx
call dword [ebp - 0x7b0]
cmp byte [ebp - 0x742], 0
mov ecx, dword [ebp - 0x748]
mov edx, dword [ebp - 0x760]
mov dword [ecx + 0xfa4], eax
mov eax, dword [ebp - 0x75c]
mov dword [ecx + 0xf7c], edx
mov dword [ecx + 0xf80], eax
je 0x1040e34b
mov edx, dword [ebp - 0x768]
mov eax, dword [edx]
shr eax, 1
and eax, 0x3fff
mov dword [ecx + 0xf84], eax
mov eax, dword [edx]
shr eax, 0xf
and eax, 0x3fff
jmp 0x1040e351
mov dword [ecx + 0xf84], edx
cmp dword [ebp - 0x774], 0
mov dword [ecx + 0xf88], eax
mov eax, dword [edi + 0x1a9c]
mov dword [ecx + 0xf8c], eax
mov eax, dword [edi + 0x1aa0]
mov dword [ecx + 0xf90], eax
je 0x1040e386
mov eax, dword [esi + 0x2b8]
shr eax, 0x1c
and eax, 1
jmp 0x1040e388
xor eax, eax
mov byte [ecx + 0xfac], al
mov al, byte [edi + 0x1ae8]
mov byte [ecx + 0xfad], al
cmp byte [esi + 0xd7], 0
je 0x1040e3b0
cmp byte [edi + 0x1aeb], 0
je 0x1040e3b0
mov al, 1
jmp 0x1040e3b2
xor al, al
mov byte [ecx + 0xfae], al
mov byte [ecx + 0xfaf], 0
mov eax, dword [esi + 0x2e0]
mov dword [ecx + 0xf98], eax
mov eax, dword [esi + 0x2d8]
mov dword [ecx + 0xf94], eax
mov eax, dword [esi + 0x2e4]
mov dword [ecx + 0xf9c], eax
mov eax, dword [esi + 0x2e8]
mov dword [ecx + 0xfa0], eax
lea eax, [edi + 0x1af8]
movups xmm0, xmmword [edi + 0x1b50]
movups xmmword [ecx + 0xfb0], xmm0
movups xmm0, xmmword [edi + 0x1b60]
movups xmmword [ecx + 0xfc0], xmm0
movq xmm0, qword [edi + 0x1b70]
movq qword [ecx + 0xfd0], xmm0
test eax, eax
je 0x1040e43a
movups xmm0, xmmword [eax]
movups xmmword [ecx + 0xfd8], xmm0
mov eax, dword [eax + 0x10]
mov dword [ecx + 0xfe8], eax
jmp 0x1040e44e
xorps xmm0, xmm0
movups xmmword [ecx + 0xfd8], xmm0
mov dword [ecx + 0xfe8], 0
mov eax, dword [ebp - 0x780]
lea edx, [ebp - 0x30]
mov dword [ecx + 0xff4], eax
xorps xmm0, xmm0
mov ecx, dword [esi + 0x6c]
mov eax, dword [esi + 0x474]
shl ecx, 4
movlpd qword [ebp - 0x818], xmm0
movlpd qword [ebp - 0x810], xmm0
movups xmm0, xmmword [0x10f16520]
mov dword [ebp - 0x82c], eax
lea eax, [ecx + 0x280]
mov dword [ebp - 0x824], eax
lea eax, [ecx + 0x2d0]
movups xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0x808], 0
lea ecx, [ebp - 0x20]
movups xmm0, xmmword [esi + 0xb0]
mov dword [ebp - 0x820], eax
mov dword [ebp - 0x81c], 1
movups xmmword [ebp - 0x20], xmm0
mov dword [ebp - 0x768], 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x1040e4ff
add ecx, 4
add edx, 4
sub dword [ebp - 0x768], 4
jae 0x1040e4d1
imul ecx, dword [esi + 0x6c], 0x1080
mov eax, dword [esi + 0x54]
add eax, 0xba40
add eax, ecx
mov dword [ebp - 0x828], eax
jmp 0x1040e509
mov dword [ebp - 0x828], 0
mov eax, dword [ebp - 0x740]
add eax, 0x3ec
lea ecx, [edi + eax*4]
movzx eax, byte [edi + 0x1ab4]
push eax
push dword [ebp - 0x780]
lea eax, [ebp - 0x82c]
mov dword [ebp - 0x750], ecx
push dword [edi + 0x1a98]
mov ecx, dword [ecx]
push eax
push dword [ebp - 0x7bc]
push dword [ebp - 0x78c]
push dword [ebp - 0x754]
call fcn.10411290
test al, al
jne 0x1040e5a1
call fcn.10410040
test al, al
je 0x1040e579
push 0xb
push dword [ebp - 0x740]
lea ecx, [ebp - 0x70]
call fcn.1040fda0
push 2
lea eax, [ebp - 0x70]
push eax
call fcn.10410370
push dword [ebp - 0x740]
mov ecx, edi
call fcn.1040f180
mov eax, dword [esi + 0x54]
add eax, 0x24
lock inc dword [eax]
push dword [ebp - 0x740]
mov ecx, edi
call fcn.1040fa60
jmp 0x1040e722
inc dword [edi + 0x1a98]
imul ecx, dword [esi + 0x6c], 0x1108
add ecx, dword [esi + 0x54]
cmp dword [ebp - 0x818], 0
seta al
mov byte [ecx + 0xfec], al
mov eax, dword [ebp - 0x814]
mov dword [ecx + 0xff0], eax
mov eax, dword [ebp - 0x810]
mov dword [ecx + 0xff8], eax
mov eax, dword [ebp - 0x80c]
mov dword [ecx + 0xffc], eax
mov eax, dword [ebp - 0x828]
test eax, eax
je 0x1040e604
push 0x1080
push eax
lea eax, [ecx + 0x1000]
push eax
call fcn.10425d60
add esp, 0xc
mov eax, dword [ebp - 0x778]
mov ecx, 3
inc dword [esi + 0x7c]
mov edx, dword [esi + 0x54]
mov eax, dword [eax]
add eax, 0x14
mov dword [ebp - 0x768], eax
xor eax, eax
mov edi, dword [ebp - 0x768]
lock cmpxchg dword [edi], ecx
mov edi, dword [ebp - 0x794]
test eax, eax
jne 0x1040e664
movzx eax, byte [edi + 0x1ab4]
mov ecx, dword [ebp - 0x750]
push eax
lea eax, [edx + 0x30]
push eax
mov ecx, dword [ecx]
lea eax, [edx + 0x38]
push 0x5dc
push eax
call fcn.10411540
mov eax, dword [ebp - 0x768]
mov dword [eax], 0
call fcn.10410040
test al, al
je 0x1040e715
push dword [ebp - 0x76c]
movzx eax, byte [edi + 0x1ae8]
lea ecx, [ebp - 0x88]
push dword [ebp - 0x77c]
push eax
push dword [esi + 0x2e8]
push dword [esi + 0x2d8]
push dword [ebp - 0x75c]
push dword [ebp - 0x760]
push dword [esi + 0x68]
push dword [esi + 0x6c]
push dword [ebp - 0x740]
call fcn.1040fbd0
push 0x20
jmp 0x1040e709
call fcn.10410040
test al, al
je 0x1040e715
push dword [ebp - 0x76c]
movzx eax, byte [edi + 0x1ae8]
lea ecx, [ebp - 0x88]
push dword [ebp - 0x77c]
push dword [ebp - 0x750]
push eax
push dword [esi + 0x2e8]
push dword [esi + 0x2dc]
push dword [ebp - 0x75c]
push dword [ebp - 0x760]
push dword [esi + 0x68]
push dword [ebp - 0x740]
call fcn.1040faa0
push 0x10
lea eax, [ebp - 0x88]
push eax
call fcn.10410370
mov eax, dword [esi + 0x54]
mov dword [eax + 0xb9dc], 0
cmp byte [ebp - 0x7d0], 0
jne 0x1040e75a
push dword [ebp - 0x7d4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1040e75a
test cl, cl
je 0x1040e75a
push dword [ebp - 0x740]
lea eax, [ebp - 0x744]
mov ecx, edi
push eax
push dword [ebp + 0x10]
push dword [ebp - 0x764]
call fcn.1040b7b0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1045066c
mov esp, ebp
pop ebp
ret 0x18