Function at 0x41b350
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 0x41b3e3
xor esi, esi
jmp 0x41b376
mov ebx, dword [ebx]
test ebx, ebx
je 0x41b3a6
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x10], 0
test eax, eax
je 0x41b370
mov dword [esp], ebx
call eax
mov edi, dword [ebx + 0x10]
test edi, edi
je 0x41b370
mov eax, dword [ebx + 4]
lea edx, [ebx + 0xc]
mov esi, 1
call fcn.00417f30
mov ebx, dword [ebx]
test ebx, ebx
jne 0x41b376
test esi, esi
je 0x41b452
mov ebx, dword [0x4ff400]
test ebx, ebx
jne 0x41b3c6
jmp 0x41b400
mov ebx, dword [ebx]
test ebx, ebx
je 0x41b400
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x41b3c0
mov dword [esp], ebx
call eax
test eax, eax
je 0x41b3c0
mov eax, dword [ebx + 4]
lea edx, [ebx + 0xc]
call fcn.00417f30
jmp 0x41b3c0
mov dword [0x4ff604], 0
test byte [0x504120], 0x80
jne 0x41bc1f
lea esi, [esi]
mov eax, dword [0x4be460]
cmp eax, 0x4be460
je 0x41b360
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 0x41b400
mov ebx, dword [0x4ff400]
mov dword [0x4ff604], 0
test ebx, ebx
je 0x41b3ed
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x41b47a
mov dword [esp], ebx
call eax
test eax, eax
je 0x41bae4
mov ecx, dword [ebx + 8]
cmp ecx, 0xffffffff
je 0x41b4ba
mov edx, dword [0x4ff604]
test edx, edx
jle 0x41b4a8
cmp ecx, dword [0x4ff404]
je 0x41b4ba
xor eax, eax
jmp 0x41b4a1
cmp ecx, dword [eax*4 + 0x4ff404]
je 0x41b4ba
add eax, 1
cmp eax, edx
jne 0x41b498
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 0x41b466
mov ebx, dword [0x4ff604]
test ebx, ebx
je 0x41b3ed
nop
mov eax, dword [0x504120]
test al, 0x80
jne 0x41b862
mov esi, dword [0x4ff604]
cmp esi, 0x40
jle 0x41b787
test byte [0x504120], 0x80
jne 0x41b9b7
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 0x41b914
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 0x41bd2e
xor eax, eax
test ebx, ebx
mov ecx, dword [ebp - 0x2c]
mov edx, 0x4ff404
jle 0x41b5bb
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 0x41b590
mov ebx, dword [ebp - 0x3c]
mov eax, ebx
cmp byte [ebp - 0x31], 0
je 0x41b5f2
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 0x41bd12
mov esi, dword [ebp - 0x2c]
xor edi, edi
jmp 0x41b60f
add edi, 1
add esi, 0x18
cmp edi, ebx
je 0x41b8f8
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x417e50
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 0x41b601
test byte [0x504120], 0x80
jne 0x41bb7e
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 0x41b6b0
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 0x41b680
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.004bcf10
sub esp, 0xc
test eax, eax
cmovns esi, eax
cmp esi, 0xffffffff
je 0x41b7b6
test byte [0x504120], 0x80
jne 0x41ba53
cmp esi, dword [0x4ff604]
jae 0x41b4d0
mov ebx, dword [0x4ff400]
test ebx, ebx
jne 0x41b72d
jmp 0x41b4d0
mov ebx, dword [ebx]
test ebx, ebx
je 0x41b4d0
mov eax, dword [ebx + 8]
cmp dword [esi*4 + 0x4ff404], eax
jne 0x41b723
mov eax, dword [ebx + 0x24]
test eax, eax
je 0x41b749
mov dword [esp], ebx
call eax
test eax, eax
je 0x41b723
test byte [0x504120], 0x80
jne 0x41bc74
mov eax, dword [ebx + 4]
lea edx, [ebx + 0xc]
call fcn.00417f30
mov ebx, dword [0x4ff400]
test ebx, ebx
je 0x41b400
nop
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x41b77c
mov dword [esp], ebx
call eax
mov ebx, dword [ebx]
test ebx, ebx
jne 0x41b770
jmp 0x41b3ae
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 0x41b6fb
mov eax, dword [0x504120]
test al, 0x80
je 0x41b4d5
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.00416f10
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.00416f10
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 0x41b4dd
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.00416f10
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.00416f10
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 0x41b4dd
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 0x41b67b
mov eax, dword [0x504120]
test al, 0x80
je 0x41b7bb
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.00416f10
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.00416f10
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 0x41b7bb
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.00416f10
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.00416f10
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 0x41b4f9
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.00416f10
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.00416f10
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 0x41b708
test byte [0x504120], 0x80
je 0x41b400
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.00416f10
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.00416f10
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 0x41b400
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.00416f10
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.00416f10
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 0x41b654
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.00416f10
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov dword [esp + 4], str.fdevent_process:_nothing_to_wait_for____n
jmp 0x41bb41
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.00416f10
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.00416f10
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 0x41b756
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 0x41b6b0
test byte [0x504120], 0x80
jne 0x41bd4c
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [0x504120]
jmp 0x41b7bb
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.00416f10
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.00416f10
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 0x41bd37