Function at 0x408710
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54f440
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x5a5784]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
push str._SEARCH_CDeviceSearchOperation::DoStatusUpdate__._n
push 0x40000
call fcn.0041abf0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
sub ecx, dword [eax + 0x38]
mov eax, 0x66666667
imul ecx
sar edx, 4
mov ebx, edx
shr ebx, 0x1f
add esp, 8
add ebx, edx
jne 0x408790
push ebx
push str._SEARCH__error__status_update_failed_becouse_of_m_vecSearchResult.size:__d._n
push 0x80000
call fcn.0041abf0
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor esi, esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], 0x28
cmp ebx, 0x28
jg 0x4087aa
mov dword [ebp - 0x14], ebx
push 0x5ad604
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, dword [ebp - 0x14]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
mov dword [ebp - 4], esi
neg ecx
or ecx, eax
push ecx
call fcn.00430e26
mov edi, eax
xor ecx, ecx
add esp, 4
mov eax, ebx
mov edx, 8
mul edx
seto cl
mov dword [ebp - 0x24], edi
neg ecx
or ecx, eax
push ecx
call fcn.00430e26
mov esi, eax
xor ecx, ecx
add esp, 4
mov eax, ebx
mov edx, 4
mul edx
seto cl
mov dword [ebp - 0x1c], esi
neg ecx
or ecx, eax
push ecx
call fcn.00430e26
mov ecx, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x20], eax
mov edi, edi
cmp eax, ebx
jge 0x408838
mov edx, dword [ebp + 8]
mov dword [ecx + eax*4], 0
mov dword [esi + eax*8 + 4], ecx
mov dword [esi + eax*8], edx
inc eax
jmp 0x408820
xor ebx, ebx
lea ebx, [ebx]
mov eax, dword [ebp - 0x14]
cmp ebx, eax
jge 0x4088dd
push 0
push 0
lea eax, [esi + ebx*8]
push eax
push 0x4095a0
push 0
push 0
call fcn.00525509
add esp, 0x18
mov dword [edi + ebx*4], eax
test eax, eax
jne 0x4088d4
push ebx
push str._SEARCH__error__status_update_start_failed_in_Threads___d_._n
push 0x80000
call fcn.0041abf0
lea eax, [ebx - 1]
add esp, 0xc
test eax, eax
jle 0x4088aa
push 0xffffffffffffffff
push 1
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
xor esi, esi
lea eax, [ebx - 1]
cmp esi, eax
jge 0x4088a7
mov ecx, dword [edi + esi*4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
jmp 0x408893
mov esi, dword [ebp - 0x1c]
test edi, edi
je 0x4088b7
push edi
call fcn.00430e1b
add esp, 4
test esi, esi
je 0x4088c4
push esi
call fcn.00430e1b
add esp, 4
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4088d4
push eax
call fcn.00430e1b
add esp, 4
inc dword [ebp - 0x20]
inc ebx
jmp 0x408840
push eax
push str._SEARCH_Status_Update_start_with___d__Threads._n
push 0x80000
call fcn.0041abf0
mov eax, dword [ebp - 0x14]
add esp, 0xc
cmp eax, dword [ebp - 0x20]
jne 0x40892c
test edi, edi
je 0x408908
push 0xffffffffffffffff
push 1
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
xor esi, esi
lea ebx, [ebx]
cmp esi, dword [ebp - 0x14]
jge 0x408929
mov edx, dword [edi + esi*4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + esi*4], 0
inc esi
jmp 0x408910
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
push eax
call fcn.00430e1b
push esi
call fcn.00430e1b
push edi
call fcn.00430e1b
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
push 0x5ad604
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push str._SEARCH_CDeviceSearchOperation::DoStatusUpdate___end._n
push 0x80000
call fcn.0041abf0
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4