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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe0
mov eax, dword [0x438170]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0xb4], ecx
mov ecx, dword [esi + 0x645c]
add ecx, 0x3c58
xor ebx, ebx
lea edx, [esi + 0x3c58]
add ecx, esi
push edi
mov dword [ebp - 0xb8], esi
mov dword [ebp - 0xa0], ebx
cmp edx, ecx
jae 0x4131f8
cmp word [edx + 0xd], 2
jae 0x413290
cmp word [edx + 0xf], 1
jae 0x413290
movzx eax, word [edx + 0x11]
add edx, 0x15
add edx, eax
cmp edx, ecx
jb 0x4131d5
cmp dword [esi + 0x54], ebx
je 0x413a49
mov dword [ebp - 0xbc], 0x542
jmp 0x413210
mov edx, dword [esi + 0x645c]
mov ecx, 0x2800
sub ecx, edx
cmp ecx, 0x95
jbe 0x413a49
mov ebx, dword [esi + 0x20]
lea eax, [esi + edx]
mov dword [ebp - 0x98], eax
lea edi, [eax + 0x3c58]
cmp ebx, 6
jne 0x41368e
mov edx, 0x27b5
sub edx, dword [esi + 0x645c]
cmp edx, 0x100
jae 0x413264
cmp dword [esi + 0x54], 0x100
jae 0x413a43
mov ecx, dword [esi + 0x54]
lea ebx, [eax + 0x3c8f]
cmp ecx, 0x542
mov eax, ecx
cmova eax, dword [ebp - 0xbc]
cmp eax, edx
jae 0x4132a5
cmp ecx, 0x542
mov eax, 0x542
cmova ecx, eax
jmp 0x4132a7
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 4
mov ecx, edx
lea eax, [ecx + 0x4b]
push eax
push 0
push edi
mov dword [ebp - 0x90], ecx
mov dword [ebp - 0xac], 0
mov dword [ebp - 0xa4], 0
call fcn.0041e930
add esp, 0xc
lea eax, [ebp - 0xc4]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
lea eax, [ebp - 0xdc]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push 0
push 0x3e8
push dword [ebp - 0xd8]
push dword [ebp - 0xdc]
call fcn.0041e850
push dword [ebp - 0xc0]
push dword [ebp - 0xc4]
push edx
push eax
call fcn.00428540
mov ecx, dword [ebp - 0x90]
mov dword [edi], eax
mov dword [edi + 4], edx
mov eax, dword [esi + 0x6458]
mov dword [edi + 8], eax
xor eax, eax
mov dword [edi + 0xd], eax
mov word [edi + 0x13], cx
lea eax, [ecx + 0x36]
mov word [edi + 0x11], ax
movzx eax, byte [esi + 0x20]
mov byte [edi + 0xc], al
mov eax, dword [esi + 0x38]
mov edi, dword [ebp - 0x98]
mov dword [edi + 0x3c6d], eax
movzx eax, word [esi + 0x3c]
mov word [edi + 0x3c71], ax
mov eax, dword [esi + 0x40]
mov dword [edi + 0x3c73], eax
movzx eax, word [esi + 0x44]
mov word [edi + 0x3c77], ax
mov eax, 8
mov word [edi + 0x3c79], ax
call fcn.0041575b
mov word [edi + 0x3c7f], ax
lea edx, [edi + 0x3c7b]
mov byte [edx], 0x45
mov word [edx + 8], 0x680
mov eax, dword [esi + 0x2c]
mov dword [edx + 0xc], eax
mov eax, dword [esi + 0x24]
mov dword [edx + 0x10], eax
xor eax, eax
mov word [edx + 0xa], ax
mov eax, dword [ebp - 0x90]
lea ecx, [eax + 0x28]
add eax, 0x28
shl eax, 8
shr ecx, 8
and ecx, 0xff
xor ecx, eax
mov word [edx + 2], cx
or byte [ebx + 0xd], 0x18
mov eax, 0x80
mov word [ebx + 0xe], ax
movzx eax, byte [ebx + 0xc]
and al, 0xf
or al, 0x50
mov byte [ebx + 0xc], al
mov ecx, dword [esi + 0x6470]
mov edx, ecx
mov eax, ecx
shl edx, 0x10
and eax, 0xff00
or edx, eax
shl edx, 8
movzx eax, byte [esi + 0x6473]
shr ecx, 8
and ecx, 0xff00
or edx, ecx
or edx, eax
mov dword [ebx + 8], edx
mov edx, dword [esi + 0x6458]
mov ecx, edx
shl ecx, 0x10
mov eax, edx
and eax, 0xff00
or ecx, eax
movzx eax, byte [esi + 0x645b]
shl ecx, 8
or ecx, eax
shr edx, 8
and edx, 0xff00
or ecx, edx
mov dword [ebx + 4], ecx
movzx eax, word [esi + 0x28]
mov ecx, dword [esi + 0x28]
sar ecx, 8
and ecx, 0xff
shl ax, 8
or cx, ax
mov word [ebx + 2], cx
movzx eax, word [esi + 0x30]
mov ecx, dword [esi + 0x30]
sar ecx, 8
shl ax, 8
and ecx, 0xff
or cx, ax
mov eax, dword [ebp - 0x90]
push eax
lea edi, [esi + 0x58]
lea eax, [ebx + 0x14]
push edi
push eax
mov word [ebx], cx
call fcn.0041bfc0
mov ecx, dword [ebp - 0x90]
mov eax, dword [esi + 0x54]
add esp, 0xc
sub eax, ecx
push eax
lea eax, [edi + ecx]
push eax
push edi
call fcn.00414590
mov eax, dword [ebp - 0x90]
mov edi, dword [ebp - 0x98]
add eax, 0x4b
add dword [esi + 0x645c], eax
mov eax, dword [ebp - 0x90]
sub dword [esi + 0x54], eax
add eax, 0x14
movzx eax, ax
mov dword [ebp - 0x94], eax
lea ecx, [ebx + 0x10]
add edi, 0x3c7b
xor edx, edx
mov word [ecx], dx
movzx eax, byte [edi + 9]
add dword [ebp - 0x94], eax
shl dword [ebp - 0x94], 8
mov edx, dword [edi + 0x10]
mov dword [ebp - 0xb0], ecx
mov ecx, dword [edi + 0xc]
mov eax, ecx
shr eax, 0x10
add dword [ebp - 0x94], eax
mov eax, edx
shr eax, 0x10
add dword [ebp - 0x94], eax
movzx eax, cx
mov ecx, dword [ebp - 0x94]
add ecx, eax
movzx eax, dx
add esp, 0xc
add ecx, eax
mov dword [ebp - 0x94], ecx
mov ecx, dword [ebp - 0x90]
mov dword [ebp - 0xa8], 0
lea eax, [ecx + 0x14]
mov dword [ebp - 0x9c], eax
cdq
sub eax, edx
sar eax, 1
cmp eax, 2
jl 0x413577
mov edx, dword [ebp - 0xac]
add ecx, 0x10
shr ecx, 2
inc ecx
lea eax, [ecx*4]
sub dword [ebp - 0x9c], eax
lea esp, [esp]
movzx eax, word [ebx]
add edx, eax
movzx eax, word [ebx + 2]
add dword [ebp - 0xa4], eax
add ebx, 4
dec ecx
jne 0x413560
jmp 0x413579
xor edx, edx
mov ecx, dword [ebp - 0x9c]
cmp ecx, 1
jle 0x413593
movzx eax, word [ebx]
add ebx, 2
mov dword [ebp - 0xa8], eax
sub ecx, 2
mov eax, dword [ebp - 0xa4]
add eax, edx
mov edx, dword [ebp - 0xa8]
add edx, eax
test ecx, ecx
je 0x4135ac
movzx eax, byte [ebx]
add edx, eax
mov eax, dword [ebp - 0x94]
add eax, edx
mov ecx, eax
shr ecx, 0x10
movzx eax, ax
add eax, ecx
mov ecx, eax
shr ecx, 0x10
add ecx, eax
mov eax, dword [ebp - 0xb0]
not ecx
mov word [eax], cx
xor eax, eax
mov word [edi + 0xa], ax
mov ecx, edi
xor edx, edx
mov ebx, 0xa
nop
movzx eax, word [ecx]
add edx, eax
lea ecx, [ecx + 2]
dec ebx
jne 0x4135e0
mov ebx, dword [ebp - 0x98]
mov ecx, edx
movzx eax, dx
shr ecx, 0x10
add eax, ecx
mov edx, eax
shr edx, 0x10
add edx, eax
mov eax, dword [ebp - 0x90]
not edx
mov word [edi + 0xa], dx
add dword [esi + 0x6458], eax
movzx edx, word [ebx + 0x3c69]
push ecx
lea eax, [ebp - 0x8c]
push eax
sub edx, 0xe
mov ecx, edi
call fcn.0040fa60
movzx eax, word [ebx + 0x3c69]
mov ecx, dword [ebp - 0xb4]
add esp, 8
mov edx, dword [ecx]
push eax
lea eax, [ebx + 0x3c6d]
push eax
push dword [esi + 0x6460]
call dword [edx + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x41366b
push dword [esi + 0x48]
mov dword [esi + 0x18], 1
call edi
push dword [esi + 0x4c]
call edi
inc word [ebx + 0x3c65]
push dword [esi + 0x4c]
call edi
mov ebx, dword [ebp - 0xa0]
add ebx, dword [ebp - 0x90]
mov dword [ebp - 0xa0], ebx
jmp 0x413a37
cmp ebx, 1
jne 0x413a31
cmp ecx, 0x153
jae 0x4136ac
cmp dword [esi + 0x54], 0x100
jae 0x413a43
mov edi, dword [esi + 0x54]
lea ebx, [eax + 0x3c8f]
cmp edi, 0x53a
mov eax, edi
mov esi, 0x53a
cmova eax, esi
mov ecx, 0x27ad
sub ecx, edx
cmp eax, ecx
jae 0x4136d7
cmp edi, esi
cmova edi, esi
jmp 0x4136d9
mov edi, ecx
lea eax, [edi + 0x53]
push eax
mov eax, dword [ebp - 0x98]
add eax, 0x3c58
push 0
push eax
mov dword [ebp - 0x90], edi
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0x9c], 0
call fcn.0041e930
add esp, 0xc
lea eax, [ebp - 0xcc]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
lea eax, [ebp - 0xd4]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push 0
push 0x3e8
push dword [ebp - 0xd0]
push dword [ebp - 0xd4]
call fcn.0041e850
push dword [ebp - 0xc8]
push dword [ebp - 0xcc]
push edx
push eax
call fcn.00428540
mov esi, dword [ebp - 0xb8]
mov ecx, dword [ebp - 0x98]
add ecx, 0x3c58
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov eax, dword [esi + 0x6458]
mov dword [ecx + 8], eax
xor eax, eax
mov dword [ecx + 0xd], eax
mov word [ecx + 0x13], di
lea eax, [edi + 0x3e]
mov word [ecx + 0x11], ax
movzx eax, byte [esi + 0x20]
mov byte [ecx + 0xc], al
mov eax, dword [esi + 0x38]
mov ecx, dword [ebp - 0x98]
mov dword [ecx + 0x3c6d], eax
movzx eax, word [esi + 0x3c]
mov word [ecx + 0x3c71], ax
mov eax, dword [esi + 0x40]
mov dword [ecx + 0x3c73], eax
movzx eax, word [esi + 0x44]
mov word [ecx + 0x3c77], ax
mov eax, 8
mov word [ecx + 0x3c79], ax
call fcn.0041575b
mov edx, dword [ebp - 0x98]
add edx, 0x3c7b
lea ecx, [edi + 0x30]
mov word [edx + 4], ax
mov byte [edx], 0x45
mov byte [edx + 8], 0x80
movzx eax, byte [esi + 0x20]
mov byte [edx + 9], al
mov eax, dword [esi + 0x2c]
mov dword [edx + 0xc], eax
mov eax, dword [esi + 0x24]
mov dword [edx + 0x10], eax
xor eax, eax
mov word [edx + 0xa], ax
shr ecx, 8
lea eax, [edi + 0x30]
and ecx, 0xff
shl eax, 8
xor ecx, eax
mov word [edx + 2], cx
mov word [ebx], 8
mov dword [ebx + 4], 1
call fcn.0041575b
mov edi, eax
call fcn.0041575b
add edi, eax
movzx edx, di
mov ax, dx
mov edi, 3
mov cx, di
ror ax, cl
mov word [ebx + 0x10], di
lea edi, [esi + 0x58]
movzx ecx, ax
shl ecx, 0x10
or ecx, edx
mov dword [ebx + 8], ecx
mov eax, dword [esi + 0x6458]
mov dword [ebx + 0x14], eax
mov eax, dword [esi + 0x6470]
mov dword [ebx + 0x18], eax
movzx ecx, word [esi + 0x30]
movzx eax, word [esi + 0x28]
shl ecx, 0x10
or ecx, eax
mov eax, dword [ebp - 0x90]
push eax
mov word [ebx + 0x12], ax
lea eax, [ebx + 0x1c]
push edi
push eax
mov dword [ebx + 0xc], ecx
call fcn.0041bfc0
mov ecx, dword [ebp - 0x90]
mov eax, dword [esi + 0x54]
add esp, 0xc
sub eax, ecx
push eax
lea eax, [edi + ecx]
push eax
push edi
call fcn.00414590
mov edi, dword [ebp - 0x90]
sub dword [esi + 0x54], edi
lea eax, [edi + 0x53]
add dword [esi + 0x645c], eax
lea eax, [ebx + 2]
mov dword [ebp - 0xac], eax
xor ecx, ecx
mov word [eax], cx
xor eax, eax
mov dword [ebp - 0xa8], eax
lea ecx, [edi + 0x1c]
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add esp, 0xc
mov dword [ebp - 0xa4], ecx
cmp eax, 2
jl 0x413914
mov edx, dword [ebp - 0xb0]
lea ecx, [edi + 0x18]
shr ecx, 2
inc ecx
lea eax, [ecx*4]
sub dword [ebp - 0xa4], eax
movzx eax, word [ebx]
add edx, eax
movzx eax, word [ebx + 2]
add dword [ebp - 0x9c], eax
add ebx, 4
dec ecx
jne 0x4138f7
mov ecx, dword [ebp - 0xa4]
jmp 0x413916
xor edx, edx
cmp ecx, 1
jle 0x41392a
movzx eax, word [ebx]
add ebx, 2
mov dword [ebp - 0xa8], eax
sub ecx, 2
mov eax, dword [ebp - 0x9c]
add eax, edx
mov edx, dword [ebp - 0xa8]
add edx, eax
test ecx, ecx
je 0x413943
movzx eax, byte [ebx]
add edx, eax
mov ecx, edx
shr ecx, 0x10
movzx eax, dx
mov edx, dword [ebp - 0x98]
add eax, ecx
mov ecx, eax
shr ecx, 0x10
add ecx, eax
mov eax, dword [ebp - 0xac]
not ecx
mov word [eax], cx
xor ecx, ecx
mov word [edx + 0x3c85], cx
lea ecx, [edx + 0x3c7b]
xor ebx, ebx
mov esi, 0xa
jmp 0x413980
movzx eax, word [ecx]
add ebx, eax
lea ecx, [ecx + 2]
dec esi
jne 0x413980
mov esi, dword [ebp - 0xb8]
mov ecx, ebx
shr ecx, 0x10
movzx eax, bx
add eax, ecx
mov ecx, eax
shr ecx, 0x10
add ecx, eax
not ecx
push ecx
lea eax, [ebp - 0x8c]
push eax
mov eax, dword [ebp - 0x98]
mov word [edx + 0x3c85], cx
add dword [esi + 0x6458], edi
movzx edx, word [eax + 0x3c69]
lea ebx, [eax + 0x3c58]
sub edx, 0xe
lea ecx, [eax + 0x3c7b]
call fcn.0040fa60
movzx eax, word [ebx + 0x11]
mov ecx, dword [ebp - 0xb4]
add esp, 8
mov edx, dword [ecx]
push eax
lea eax, [ebx + 0x15]
push eax
push dword [esi + 0x6460]
call dword [edx + 0x20]
test eax, eax
jne 0x413a14
push dword [esi + 0x48]
mov dword [esi + 0x18], 1
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [esi + 0x4c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
inc word [ebx + 0xd]
push dword [esi + 0x4c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebx, dword [ebp - 0xa0]
add ebx, edi
mov dword [ebp - 0xa0], ebx
jmp 0x413a37
mov ebx, dword [ebp - 0xa0]
cmp dword [esi + 0x54], 0
jne 0x413210
jmp 0x413a49
mov ebx, dword [ebp - 0xa0]
mov ecx, dword [ebp - 8]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.004144c7
mov esp, ebp
pop ebp
ret 4