Function at 0x413190
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x74
mov eax, dword [0x5bf364]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x10], edi
lea eax, [edi + 4]
mov dword [esp + 0x18], eax
mov eax, dword [edi + 4]
test eax, eax
je 0x4135e9
mov edx, dword [eax + 0x18]
lea esi, [eax + 0x18]
cmp edx, 5
jne 0x4133b6
mov dword [esp + 0x14], 1
mov eax, 1
xchg dword [esi], eax
mov eax, dword [edi + 4]
mov ecx, dword [edi + 0x10]
mov esi, dword [eax + 0x1c]
test ecx, ecx
je 0x4131f7
push 0
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, dword [edi + 4]
mov ecx, dword [eax + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_SetEvent]
test ecx, ecx
je 0x41320a
push ecx
call ebx
mov eax, dword [edi + 4]
cmp dword [eax + 0x34], 0
jbe 0x413251
push 0
push 0
push eax
push 0x4130f0
push dword [eax + 4]
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
test edi, edi
je 0x413251
push 0x32
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x41324a
call fcn.00413920
push 0x32
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x413238
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x41328a
mov edi, dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
nop dword [eax + eax]
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 4]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x413278
push ecx
call ebx
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 4]
push 0
push 0
push 0x2766
push dword [eax]
call edi
sub esi, 1
jne 0x413260
cmp dword [esp + 0x14], 0
jne 0x413579
mov eax, dword [ebp + 0xc]
or ecx, 0xffffffff
push 0
push 0
push 0
mov eax, dword [eax]
cmp eax, ecx
push 0
cmovg ecx, eax
mov dword [esp + 0x24], ecx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ebx, dword [esp + 0x18]
mov ecx, eax
mov eax, dword [ebx]
add eax, 0xc
xchg dword [eax], ecx
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movsd xmm0, qword [0x5950b8]
sub esp, 8
movzx eax, word [esp + 0x6e]
movzx edx, word [esp + 0x62]
movzx ecx, word [esp + 0x60]
movsd qword [esp], xmm0
push eax
movzx eax, word [esp + 0x70]
push eax
movzx eax, word [esp + 0x72]
push eax
movzx eax, word [esp + 0x74]
push eax
movzx eax, word [esp + 0x76]
push eax
call fcn.0049e3d0
mov eax, dword [ebx]
add esp, 0x1c
movsd qword [esp + 0x58], xmm0
cmp dword [eax + 0x1c], 0
jbe 0x41357d
mov esi, dword [sym.imp.USER32.dll_PeekMessageW]
mov edi, dword [sym.imp.USER32.dll_GetMessageW]
nop word [eax + eax]
cmp dword [esp + 0x14], 0
jle 0x413504
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movsd xmm0, qword [0x5950b8]
sub esp, 8
movzx eax, word [esp + 0x82]
movzx edx, word [esp + 0x76]
movzx ecx, word [esp + 0x74]
movsd qword [esp], xmm0
push eax
movzx eax, word [esp + 0x84]
push eax
movzx eax, word [esp + 0x86]
push eax
movzx eax, word [esp + 0x88]
push eax
movzx eax, word [esp + 0x8a]
push eax
call fcn.0049e3d0
movsd xmm2, qword [0x5950b8]
add esp, 0x1c
comisd xmm2, xmm0
movsd xmm3, qword [0x594ff0]
jbe 0x4133e6
movaps xmm1, xmm2
movsd qword [esp + 0x18], xmm2
jmp 0x4133f3
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [esp + 0x14], ecx
cmp edx, 1
jne 0x4131d6
test ecx, ecx
jne 0x4131d6
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.0050ec8c
mov esp, ebp
pop ebp
ret 8
movaps xmm1, xmm3
minsd xmm1, xmm0
movsd qword [esp + 0x18], xmm1
movsd xmm4, qword [esp + 0x58]
comisd xmm2, xmm4
movsd qword [esp + 0x20], xmm1
ja 0x41340c
movaps xmm2, xmm3
minsd xmm2, xmm4
ucomisd xmm1, xmm2
movsd qword [esp + 0x28], xmm2
movsd qword [esp + 0x30], xmm2
lahf
test ah, 0x44
jnp 0x4134fd
movsd xmm0, qword [0x595040]
comisd xmm1, xmm0
ja 0x413472
fld qword [esp + 0x20]
sub esp, 8
fstp qword [esp]
call fcn.00539990
movsd xmm0, qword [esp + 0x20]
add esp, 8
movsd xmm2, qword [esp + 0x30]
fstp qword [esp + 0x20]
movsd xmm1, qword [esp + 0x20]
subsd xmm0, xmm1
subsd xmm1, xmm0
movsd xmm0, qword [0x595040]
movsd qword [esp + 0x18], xmm1
comisd xmm2, xmm0
ja 0x4134a2
fld qword [esp + 0x28]
sub esp, 8
fstp qword [esp]
call fcn.00539990
movsd xmm0, qword [esp + 0x38]
add esp, 8
fstp qword [esp + 0x28]
movsd xmm2, qword [esp + 0x28]
subsd xmm0, xmm2
subsd xmm2, xmm0
movsd xmm1, qword [esp + 0x18]
movsd xmm0, qword [0x5950c0]
subsd xmm1, xmm2
comisd xmm0, xmm1
ja 0x4134c6
movsd xmm0, qword [0x594ff8]
minsd xmm0, xmm1
mulsd xmm0, qword [0x594f68]
mulsd xmm0, qword [0x594f78]
mulsd xmm0, qword [0x594f78]
mulsd xmm0, qword [0x594fb0]
addsd xmm0, qword [0x594e88]
call fcn.0050f940
cmp eax, dword [esp + 0x14]
jge 0x41357d
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 4]
test eax, eax
je 0x41357d
push 0x32
push dword [eax + 0xc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push 0
push 0
push 0
lea eax, [esp + 0x4c]
push eax
call esi
test eax, eax
je 0x413567
cmp dword [esp + 0x40], 0x12
je 0x413567
push 0
push 0
push 0
lea eax, [esp + 0x48]
push eax
call edi
test eax, eax
jle 0x413567
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 0
push 0
push 0
push 0
lea eax, [esp + 0x4c]
push eax
call esi
test eax, eax
jne 0x413526
mov eax, dword [ebx]
test eax, eax
je 0x41357d
cmp dword [eax + 0x1c], 0
ja 0x413330
jmp 0x41357d
mov ebx, dword [esp + 0x18]
mov eax, dword [ebx]
test eax, eax
je 0x4135e9
mov ecx, dword [eax + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test ecx, ecx
je 0x4135a5
push ecx
call edi
mov eax, dword [ebx]
xor ecx, ecx
add eax, 0x14
xchg dword [eax], ecx
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 4]
jmp 0x4135a9
mov esi, dword [esp + 0x10]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x4135bf
push ecx
call edi
mov eax, dword [ebx]
xor ecx, ecx
add eax, 0x10
xchg dword [eax], ecx
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x4135d5
push ecx
call edi
mov eax, dword [ebx]
xor ecx, ecx
add eax, 0xc
xchg dword [eax], ecx
mov eax, dword [esi + 4]
push dword [eax]
call edi
mov edx, dword [ebx]
xor esi, esi
add edx, 0x18
xchg dword [edx], esi
mov ecx, ebx
call fcn.00413990
mov ecx, dword [esp + 0x7c]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0050ec8c
mov esp, ebp
pop ebp
ret 8