Function at 0x41b3e0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
lea esi, [esi]
mov ebx, dword [0x4ff400]
test ebx, ebx
je 0x41b473
xor esi, esi
jmp 0x41b406
mov ebx, dword [ebx]
test ebx, ebx
je 0x41b436
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x10], 0
test eax, eax
je 0x41b400
mov dword [esp], ebx
call eax
mov edi, dword [ebx + 0x10]
test edi, edi
je 0x41b400
mov eax, dword [ebx + 4]
lea edx, [ebx + 0xc]
mov esi, 1
call fcn.00417fc0
mov ebx, dword [ebx]
test ebx, ebx
jne 0x41b406
test esi, esi
je 0x41b4e2
mov ebx, dword [0x4ff400]
test ebx, ebx
jne 0x41b456
jmp 0x41b490
mov ebx, dword [ebx]
test ebx, ebx
je 0x41b490
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x41b450
mov dword [esp], ebx
call eax
test eax, eax
je 0x41b450
mov eax, dword [ebx + 4]
lea edx, [ebx + 0xc]
call fcn.00417fc0
jmp 0x41b450
mov dword [0x4ff604], 0
test byte [0x504120], 0x80
jne 0x41bcaf
lea esi, [esi]
mov eax, dword [0x4be460]
cmp eax, 0x4be460
je 0x41b3f0
mov edx, dword [eax]
xor ecx, ecx
mov dword [edx + 4], 0x4be460
mov dword [0x4be460], edx
movzx edx, word [eax + 0x12]
mov word [eax + 0x12], cx
mov ecx, dword [eax + 0x18]
mov dword [eax], 0
mov dword [eax + 4], 0
and word [eax + 0x10], 0xfdff
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov edx, dword [eax + 8]
mov dword [esp], edx
call dword [eax + 0x14]
jmp 0x41b490
mov ebx, dword [0x4ff400]
mov dword [0x4ff604], 0
test ebx, ebx
je 0x41b47d
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x41b50a
mov dword [esp], ebx
call eax
test eax, eax
je 0x41bb74
mov ecx, dword [ebx + 8]
cmp ecx, 0xffffffff
je 0x41b54a
mov edx, dword [0x4ff604]
test edx, edx
jle 0x41b538
cmp ecx, dword [0x4ff404]
je 0x41b54a
xor eax, eax
jmp 0x41b531
cmp ecx, dword [eax*4 + 0x4ff404]
je 0x41b54a
add eax, 1
cmp eax, edx
jne 0x41b528
lea eax, [edx + 1]
mov dword [0x4ff604], eax
mov eax, dword [ebx + 8]
mov dword [edx*4 + 0x4ff404], eax
mov ebx, dword [ebx]
test ebx, ebx
jne 0x41b4f6
mov ebx, dword [0x4ff604]
test ebx, ebx
je 0x41b47d
nop
mov eax, dword [0x504120]
test al, 0x80
jne 0x41b8f2
mov esi, dword [0x4ff604]
cmp esi, 0x40
jle 0x41b817
test byte [0x504120], 0x80
jne 0x41ba47
mov eax, 0x82082083
imul esi
mov eax, esi
sar eax, 0x1f
mov dword [ebp - 0x1c], 0xffffffff
lea ebx, [edx + esi]
sar ebx, 5
sub ebx, eax
mov eax, esi
mov edi, ebx
shl edi, 6
sub edi, ebx
sub eax, edi
mov dword [ebp - 0x38], eax
setne al
mov byte [ebp - 0x31], al
movzx eax, al
add eax, ebx
lea eax, [eax + eax*2]
shl eax, 3
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [ebp - 0x2c], eax
je 0x41b9a4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
test eax, eax
mov dword [ebp - 0x30], eax
je 0x41bdbe
xor eax, eax
test ebx, ebx
mov ecx, dword [ebp - 0x2c]
mov edx, 0x4ff404
jle 0x41b64b
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0x3c], ebx
lea esi, [esi]
mov dword [ecx + 0x10], eax
lea ebx, [ebp - 0x1c]
add eax, 0x3f
mov dword [ecx + 8], edx
add ecx, 0x18
add edx, 0xfc
mov dword [ecx - 0x18], esi
mov dword [ecx - 0x14], ebx
mov dword [ecx - 0xc], 0x3f
cmp eax, edi
jne 0x41b620
mov ebx, dword [ebp - 0x3c]
mov eax, ebx
cmp byte [ebp - 0x31], 0
je 0x41b682
mov edi, dword [ebp - 0x2c]
mov ecx, eax
add ebx, 1
shl ecx, 6
lea edx, [eax + eax*2]
sub ecx, eax
lea eax, [ecx*4 + 0x4ff404]
lea edx, [edi + edx*8]
mov edi, dword [ebp - 0x30]
mov dword [edx + 8], eax
mov eax, dword [ebp - 0x38]
mov dword [edx + 0x10], ecx
mov dword [edx], edi
lea edi, [ebp - 0x1c]
mov dword [edx + 4], edi
mov dword [edx + 0xc], eax
test ebx, ebx
jle 0x41bda2
mov esi, dword [ebp - 0x2c]
xor edi, edi
jmp 0x41b69f
add edi, 1
add esi, 0x18
cmp edi, ebx
je 0x41b988
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x417ee0
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
test eax, eax
mov dword [esi + 0x14], eax
jne 0x41b691
test byte [0x504120], 0x80
jne 0x41bc0e
mov esi, dword [ebp - 0x30]
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
test edi, edi
je 0x41b740
mov ebx, dword [ebp - 0x2c]
xor esi, esi
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebx + 0x14]
add esi, 1
add ebx, 0x18
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebx - 4]
sub esp, 8
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
cmp edi, esi
jg 0x41b710
mov eax, dword [ebp - 0x30]
mov esi, 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x2c]
sub esp, 4
mov dword [esp], eax
call sub.msvcrt.dll_free
lea eax, [ebp - 0x1c]
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call fcn.004bd460
sub esp, 0xc
test eax, eax
cmovns esi, eax
cmp esi, 0xffffffff
je 0x41b846
test byte [0x504120], 0x80
jne 0x41bae3
cmp esi, dword [0x4ff604]
jae 0x41b560
mov ebx, dword [0x4ff400]
test ebx, ebx
jne 0x41b7bd
jmp 0x41b560
mov ebx, dword [ebx]
test ebx, ebx
je 0x41b560
mov eax, dword [ebx + 8]
cmp dword [esi*4 + 0x4ff404], eax
jne 0x41b7b3
mov eax, dword [ebx + 0x24]
test eax, eax
je 0x41b7d9
mov dword [esp], ebx
call eax
test eax, eax
je 0x41b7b3
test byte [0x504120], 0x80
jne 0x41bd04
mov eax, dword [ebx + 4]
lea edx, [ebx + 0xc]
call fcn.00417fc0
mov ebx, dword [0x4ff400]
test ebx, ebx
je 0x41b490
nop
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x41b80c
mov dword [esp], ebx
call eax
mov ebx, dword [ebx]
test ebx, ebx
jne 0x41b800
jmp 0x41b43e
mov dword [esp], esi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0
mov dword [esp + 4], 0x4ff404
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov esi, eax
sub esp, 0x10
cmp esi, 0xffffffff
jne 0x41b78b
mov eax, dword [0x504120]
test al, 0x80
je 0x41b565
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.fdevent_process
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416fa0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], str.adb_win32:_wait_failed__error__ld_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00416fa0
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov eax, dword [0x504120]
test al, 0x80
je 0x41b56d
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.fdevent_process
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416fa0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov eax, dword [0x4ff604]
mov dword [esp + 4], str.adb_win32:_waiting_for__d_events_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00416fa0
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
jmp 0x41b56d
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
jmp 0x41b70b
mov eax, dword [0x504120]
test al, 0x80
je 0x41b84b
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str._wait_for_all
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416fa0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], esi
mov dword [esp + 4], str.Unable_to_allocate_thread_array_for__d_handles.
add eax, 0x40
mov dword [esp], eax
call fcn.00416fa0
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov eax, dword [0x504120]
jmp 0x41b84b
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.fdevent_process
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416fa0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov eax, dword [0x4ff604]
mov dword [esp + 4], str.handle_count__d_exceeds_MAXIMUM_WAIT_OBJECTS._n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00416fa0
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov esi, dword [0x4ff604]
jmp 0x41b589
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.fdevent_process
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416fa0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], esi
mov dword [esp + 4], str.adb_win32:_got_one__index__d__n
add eax, 0x40
mov dword [esp], eax
call fcn.00416fa0
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
jmp 0x41b798
test byte [0x504120], 0x80
je 0x41b490
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.fdevent_process
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416fa0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov dword [esp + 4], str.fdevent_process:_error_when_starting_a_hook_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00416fa0
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
jmp 0x41b490
call dword [sym.imp.msvcrt.dll__errno]
mov esi, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str._wait_for_all
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416fa0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], esi
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov dword [esp + 4], str.Unable_to_create_a_waiting_thread__d_of__d._errno_d
mov dword [esp + 0x10], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00416fa0
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], esi
jmp 0x41b6e4
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.fdevent_process
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416fa0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov dword [esp + 4], str.fdevent_process:_nothing_to_wait_for____n
jmp 0x41bbd1
call dword [sym.imp.msvcrt.dll__errno]
mov esi, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.fdevent_process
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416fa0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], esi
mov eax, dword [ebx + 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 4]
mov dword [esp + 4], str.adb_win32:_signaling__s_for__x_n
add eax, 0x18
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00416fa0
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], esi
jmp 0x41b7e6
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
jmp 0x41b740
test byte [0x504120], 0x80
jne 0x41bddc
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [0x504120]
jmp 0x41b84b
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str._wait_for_all
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416fa0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], str.Unable_to_create_main_event._Error:__d
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00416fa0
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
jmp 0x41bdc7