Function at 0x4707a0
Capabilities:
Resume thread

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x40
mov esi, edx
mov rbx, rcx
call fcn.00497370
cmp dword [rbx + 0x158], 0
jne 0x4707d1
test esi, esi
je 0x4707d1
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x2c8]
mov dword [rbx + 0x158], eax
lea rax, [rbx + 0x1c8]
test rax, rax
je 0x470849
cmp qword [rax + 0x40], 0
je 0x470849
movsd xmm0, qword [0x00537db8]
mov rcx, qword [rbx + 0x208]
xor r8d, r8d
mov edx, 0x418
mulsd xmm0, qword [0x0050b7e8]
cvttsd2si eax, xmm0
movsxd r9, eax
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [rbx + 0x208]
xor r9d, r9d
lea r8d, [r9 + 2]
mov edx, 0x415
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [rbx + 0x208]
mov edx, 0x403
add ax, 0xbb8
mov r8d, 2
movzx r9d, ax
call qword [sym.imp.USER32.dll_SendMessageW]
mov rdi, qword [rbx + 0xf8]
mov qword [rsp + 0x68], rbp
test rdi, rdi
je 0x470913
cmp dword [rbx + 0x1a8], 0
ja 0x470874
cmp dword [rbx + 0x184], 0
je 0x470913
test esi, esi
je 0x4708b3
cmp qword [rdi + 0x1680], 0
je 0x470913
mov rcx, qword [rdi + 0x1680]
lea rdx, [rbx + 0x160]
mov rax, qword [rcx]
call qword [rax + 0x30]
test eax, eax
js 0x470913
lea rcx, [rdi + 0x1688]
lea rdx, [rbx + 0x160]
call fcn.0049c398
jmp 0x470913
cmp qword [rdi + 0x1680], 0
je 0x470913
lea rdx, [rbx + 0x160]
lea rcx, [rdi + 0x1688]
xor r8d, r8d
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], r13
call fcn.0049c280
test rax, rax
mov r13, rax
je 0x470909
mov rcx, qword [rdi + 0x1680]
lea rdx, [rbx + 0x160]
mov r8, qword [rcx]
call qword [r8 + 0x38]
lea rcx, [rdi + 0x1688]
mov rdx, r13
call fcn.0049c234
mov r12, qword [rsp + 0x70]
mov r13, qword [rsp + 0x78]
cmp qword [rbx + 0x2c0], 0
jle 0x470a2f
cmp qword [rbx + 0x2e8], 0
jne 0x470942
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx + 0x2e8], rax
test esi, esi
je 0x4709ca
xor esi, esi
lea rcx, [0x00470f40]
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], 4
call fcn.004a0d48
test rax, rax
mov rbp, rax
je 0x470a2f
lea rdi, [rbx + 0x2e0]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdx, qword [rbp + 0x58]
mov dword [rsp + 0x30], 2
mov r9, rdi
mov r8, rbx
mov rcx, rax
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], esi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rcx, qword [rbp + 0x58]
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
pop rsi
pop rbx
jmp qword [sym.imp.KERNEL32.dll_ResumeThread]
xor esi, esi
cmp qword [rbx + 0x2e0], rsi
mov dword [rsp + 0x60], esi
je 0x470a2f
mov rcx, qword [rbx + 0x2e8]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rbx + 0x2e0]
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x470a16
cmp dword [rsp + 0x60], 0x103
jne 0x470a16
mov rcx, qword [rbx + 0x2e0]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x2e0]
test rcx, rcx
je 0x470a2f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x2e0], rsi
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret