Function at 0x410960
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [0x43d3d8]
add eax, 0x40
mov dword [ebp - 0x30], eax
mov eax, dword [0x43bf58]
mov ebx, eax
test eax, eax
je 0x410a6d
xor esi, esi
jmp 0x41098d
mov ebx, dword [ebx]
test ebx, ebx
je 0x4109bd
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x10], 0
test eax, eax
je 0x410987
sub esp, 0xc
push ebx
call eax
mov eax, dword [ebx + 0x10]
add esp, 0x10
test eax, eax
je 0x410987
mov eax, ebx
mov esi, 1
call dbg.event_hook_signal
mov ebx, dword [ebx]
test ebx, ebx
jne 0x41098d
test esi, esi
je 0x410ef2
mov ebx, dword [0x43bf58]
test ebx, ebx
jne 0x4109d7
jmp 0x4109f8
mov ebx, dword [ebx]
test ebx, ebx
je 0x4109f8
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x4109d1
sub esp, 0xc
push ebx
call eax
add esp, 0x10
test eax, eax
je 0x4109d1
mov eax, ebx
call dbg.event_hook_signal
mov ebx, dword [ebx]
test ebx, ebx
jne 0x4109d7
mov edx, dword [0x41f200]
cmp edx, 0x41f200
je 0x410974
lea esi, [esi]
mov eax, dword [edx]
and word [edx + 0x10], 0xfdff
mov dword [eax + 4], 0x41f200
mov dword [0x41f200], eax
mov dword [edx + 4], 0
mov ax, word [edx + 0x12]
mov dword [edx], 0
mov word [edx + 0x12], 0
push ebx
and eax, 0xffff
mov ecx, dword [edx + 0x18]
push ecx
push eax
mov eax, dword [edx + 8]
push eax
call dword [edx + 0x14]
mov edx, dword [0x41f200]
add esp, 0x10
cmp edx, 0x41f200
jne 0x410a10
mov eax, dword [0x43bf58]
mov ebx, eax
test eax, eax
jne 0x410983
mov dword [0x43c15c], 0
mov ebx, eax
test eax, eax
je 0x410f0b
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x410a99
sub esp, 0xc
push ebx
call eax
add esp, 0x10
test eax, eax
je 0x411053
mov ecx, dword [ebx + 8]
cmp ecx, 0xffffffff
je 0x410ad1
mov eax, dword [0x43c15c]
test eax, eax
jle 0x410ac4
xor edx, edx
cmp ecx, dword [0x43bf5c]
jne 0x410abf
jmp 0x410ad1
cmp ecx, dword [edx*4 + 0x43bf5c]
je 0x410ad1
inc edx
cmp edx, eax
jne 0x410ab6
mov dword [eax*4 + 0x43bf5c], ecx
inc eax
mov dword [0x43c15c], eax
mov ebx, dword [ebx]
test ebx, ebx
jne 0x410a81
mov ebx, dword [0x43c15c]
test ebx, ebx
je 0x410f0b
mov eax, dword [0x43cb58]
test al, al
js 0x410df8
mov esi, dword [0x43c15c]
cmp esi, 0x40
jle 0x410d57
cmp byte [0x43cb58], 0
js 0x410fc7
mov eax, esi
mov edx, 0x82082083
imul edx
mov eax, esi
mov dword [ebp - 0x10], 0xffffffff
sar eax, 0x1f
lea edi, [edx + esi]
sar edi, 5
sub edi, eax
mov eax, esi
mov ebx, edi
shl ebx, 6
sub ebx, edi
sub eax, ebx
mov dword [ebp - 0x2c], eax
setne al
and eax, 0xff
sub esp, 0xc
add eax, edi
lea eax, [eax + eax*2]
shl eax, 3
push eax
call sym._malloc
add esp, 0x10
mov dword [ebp - 0x24], eax
test eax, eax
je 0x410e6b
push 0
push 0
push 1
push 0
call fcn.0041dd74
mov dword [ebp - 0x28], eax
test eax, eax
je 0x4110cb
xor ecx, ecx
test edi, edi
jle 0x410bb1
mov edx, dword [ebp - 0x24]
xor ecx, ecx
add edx, 0x10
mov eax, dword [ebp - 0x28]
mov dword [edx], ecx
mov dword [edx - 0x10], eax
lea eax, [ebp - 0x10]
mov dword [edx - 0xc], eax
lea eax, [ecx*4 + 0x43bf5c]
add ecx, 0x3f
mov dword [edx - 8], eax
mov dword [edx - 4], 0x3f
add edx, 0x18
cmp ecx, ebx
jne 0x410b86
mov ecx, edi
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x410be7
mov eax, dword [ebp - 0x24]
lea edx, [ecx + ecx*2]
inc edi
lea edx, [eax + edx*8]
mov eax, dword [ebp - 0x28]
mov dword [edx], eax
lea eax, [ebp - 0x10]
mov dword [edx + 4], eax
mov eax, ecx
shl eax, 6
sub eax, ecx
mov dword [edx + 0x10], eax
lea eax, [eax*4 + 0x43bf5c]
mov dword [edx + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [edx + 0xc], eax
test edi, edi
jle 0x41126c
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x20], 0
mov ebx, esi
jmp 0x410c13
mov eax, dword [ebp - 0x20]
add ebx, 0x18
inc eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], edi
je 0x41103f
push eax
push eax
push 0
push 0
push ebx
push dbg._in_waiter_thread
push 0
push 0
call sym.__beginthreadex
add esp, 0x20
mov dword [ebx + 0x14], eax
test eax, eax
jne 0x410c00
cmp byte [0x43cb58], 0
js 0x41110b
sub esp, 0xc
mov edx, dword [ebp - 0x28]
push edx
call fcn.0041dd5c
sub esp, 0xc
mov eax, dword [ebp - 0x28]
push 0xffffffffffffffff
push eax
call fcn.0041dd7c
mov eax, dword [ebp - 0x20]
add esp, 0x18
test eax, eax
jle 0x410c88
xor ebx, ebx
push eax
push eax
push 0xffffffffffffffff
inc ebx
mov eax, dword [esi + 0x14]
push eax
call fcn.0041dd7c
push eax
mov edi, dword [esi + 0x14]
add esi, 0x18
push edi
call fcn.0041dd14
add esp, 0xc
cmp dword [ebp - 0x20], ebx
jg 0x410c65
sub esp, 0xc
mov esi, dword [ebp - 0x28]
push esi
call fcn.0041dd14
mov ebx, dword [ebp - 0x24]
push ebx
call sym._free
add esp, 0xc
lea eax, [ebp - 0x10]
push 0xffffffffffffffff
push 0xffffffffffffffff
push eax
call fcn.0041dd6c
pop ecx
mov edi, eax
test eax, eax
js 0x4110f9
mov eax, dword [0x43cb58]
cmp edi, 0xffffffff
je 0x410d76
test al, al
js 0x410f5a
cmp edi, dword [0x43c15c]
jae 0x410ae5
mov esi, dword [0x43bf58]
test esi, esi
jne 0x410cfa
jmp 0x410ae5
mov esi, dword [esi]
test esi, esi
je 0x410ae5
mov eax, dword [edi*4 + 0x43bf5c]
cmp eax, dword [esi + 8]
jne 0x410cf0
mov eax, dword [esi + 0x24]
test eax, eax
je 0x410d1a
sub esp, 0xc
push esi
call eax
add esp, 0x10
test eax, eax
je 0x410cf0
cmp byte [0x43cb58], 0
js 0x411184
mov eax, esi
call dbg.event_hook_signal
mov ebx, dword [0x43bf58]
test ebx, ebx
je 0x4109f8
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x410d4c
sub esp, 0xc
push ebx
call eax
add esp, 0x10
mov ebx, dword [ebx]
test ebx, ebx
jne 0x410d3c
jmp 0x4109c5
push 0xffffffffffffffff
push 0
push 0x43bf5c
push esi
call fcn.0041dd64
mov edi, eax
mov eax, dword [0x43cb58]
cmp edi, 0xffffffff
jne 0x410cc6
test al, al
jns 0x410aea
call sym.__errno
sub esp, 0xc
mov ebx, dword [eax]
push 0x43cb38
call fcn.0041dcdc
mov edx, dword [ebp - 0x30]
add esp, 0xc
push str.fdevent_process
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push edx
call dbg.fprintf
call sym.__errno
mov dword [eax], ebx
call fcn.0041dd24
add esp, 0xc
push eax
mov eax, dword [ebp - 0x30]
push str.adb_win32:_wait_failed__error__ld_n
push eax
call dbg.fprintf
pop eax
mov eax, dword [ebp - 0x30]
push eax
call sym._fflush
mov dword [esp], 0x43cb38
call fcn.0041dce4
add esp, 0xc
call sym.__errno
mov dword [eax], ebx
mov eax, dword [0x43cb58]
test al, al
jns 0x410af2
call sym.__errno
sub esp, 0xc
mov ebx, dword [eax]
push 0x43cb38
call fcn.0041dcdc
mov eax, dword [ebp - 0x30]
add esp, 0xc
push str.fdevent_process
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push eax
call dbg.fprintf
call sym.__errno
add esp, 0xc
mov dword [eax], ebx
mov edi, dword [0x43c15c]
mov esi, dword [ebp - 0x30]
push edi
push str.adb_win32:_waiting_for__d_events_n
push esi
call dbg.fprintf
pop ecx
mov edx, dword [ebp - 0x30]
push edx
call sym._fflush
mov dword [esp], 0x43cb38
call fcn.0041dce4
add esp, 0xc
call sym.__errno
mov dword [eax], ebx
jmp 0x410af2
mov eax, dword [0x43cb58]
test al, al
jns 0x410d76
call sym.__errno
sub esp, 0xc
mov ebx, dword [eax]
push 0x43cb38
call fcn.0041dcdc
mov eax, dword [ebp - 0x30]
add esp, 0xc
push str._wait_for_all
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push eax
call dbg.fprintf
call sym.__errno
add esp, 0xc
mov dword [eax], ebx
push esi
mov edi, dword [ebp - 0x30]
push str.Unable_to_allocate_thread_array_for__d_handles.
push edi
call dbg.fprintf
pop esi
mov ecx, dword [ebp - 0x30]
push ecx
call sym._fflush
mov dword [esp], 0x43cb38
call fcn.0041dce4
add esp, 0xc
call sym.__errno
mov dword [eax], ebx
mov eax, dword [0x43cb58]
test al, al
jns 0x410aea
jmp 0x410d7e
mov eax, dword [0x43bf58]
mov dword [0x43c15c], 0
mov ebx, eax
test eax, eax
jne 0x410a81
cmp byte [0x43cb58], 0
jns 0x4109f8
call sym.__errno
sub esp, 0xc
mov ebx, dword [eax]
push 0x43cb38
call fcn.0041dcdc
mov ecx, dword [ebp - 0x30]
add esp, 0xc
push str.fdevent_process
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push ecx
call dbg.fprintf
call sym.__errno
mov dword [eax], ebx
pop eax
pop edx
push str.fdevent_process:_nothing_to_wait_for____n
jmp 0x41109d
call sym.__errno
sub esp, 0xc
mov ebx, dword [eax]
push 0x43cb38
call fcn.0041dcdc
mov eax, dword [ebp - 0x30]
add esp, 0xc
push str.fdevent_process
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push eax
call dbg.fprintf
call sym.__errno
add esp, 0xc
mov dword [eax], ebx
push edi
mov eax, dword [ebp - 0x30]
push str.adb_win32:_got_one__index__d__n
push eax
call dbg.fprintf
pop eax
mov esi, dword [ebp - 0x30]
push esi
call sym._fflush
mov dword [esp], 0x43cb38
call fcn.0041dce4
add esp, 0xc
call sym.__errno
mov dword [eax], ebx
jmp 0x410cce
call sym.__errno
sub esp, 0xc
mov ebx, dword [eax]
push 0x43cb38
call fcn.0041dcdc
mov eax, dword [ebp - 0x30]
add esp, 0xc
push str.fdevent_process
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push eax
call dbg.fprintf
call sym.__errno
add esp, 0xc
mov dword [eax], ebx
mov eax, dword [0x43c15c]
push eax
mov eax, dword [ebp - 0x30]
push str.handle_count__d_exceeds_MAXIMUM_WAIT_OBJECTS._n
push eax
call dbg.fprintf
pop eax
mov eax, dword [ebp - 0x30]
push eax
call sym._fflush
mov dword [esp], 0x43cb38
call fcn.0041dce4
add esp, 0xc
call sym.__errno
mov dword [eax], ebx
mov esi, dword [0x43c15c]
jmp 0x410b0e
push eax
push eax
mov eax, dword [ebp - 0x28]
push 0xffffffffffffffff
push eax
call fcn.0041dd7c
pop edi
pop eax
jmp 0x410c63
cmp byte [0x43cb58], 0
jns 0x4109f8
call sym.__errno
sub esp, 0xc
mov ebx, dword [eax]
push 0x43cb38
call fcn.0041dcdc
mov eax, dword [ebp - 0x30]
add esp, 0xc
push str.fdevent_process
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push eax
call dbg.fprintf
call sym.__errno
mov dword [eax], ebx
pop esi
pop edi
push str.fdevent_process:_error_when_starting_a_hook_n
mov eax, dword [ebp - 0x30]
push eax
call dbg.fprintf
pop eax
mov eax, dword [ebp - 0x30]
push eax
call sym._fflush
mov dword [esp], 0x43cb38
call fcn.0041dce4
add esp, 0xc
call sym.__errno
mov dword [eax], ebx
jmp 0x4109f8
cmp byte [0x43cb58], 0
js 0x4111fa
sub esp, 0xc
mov eax, dword [ebp - 0x24]
push eax
call sym._free
mov eax, dword [0x43cb58]
add esp, 0x10
test al, al
jns 0x410aea
jmp 0x410d7e
mov eax, dword [0x43cb58]
test al, al
jns 0x410aea
jmp 0x410d7e
call sym.__errno
sub esp, 0xc
mov ebx, dword [eax]
push 0x43cb38
call fcn.0041dcdc
mov ecx, dword [ebp - 0x30]
add esp, 0xc
push str._wait_for_all
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push ecx
call dbg.fprintf
call sym.__errno
mov dword [eax], ebx
call sym.__errno
pop edx
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 0x20]
push edi
mov edi, dword [ebp - 0x30]
push eax
push str.Unable_to_create_a_waiting_thread__d_of__d._errno_d
push edi
call dbg.fprintf
add esp, 0x14
mov ecx, dword [ebp - 0x30]
push ecx
call sym._fflush
mov dword [esp], 0x43cb38
call fcn.0041dce4
add esp, 0xc
call sym.__errno
mov dword [eax], ebx
jmp 0x410c3f
call sym.__errno
sub esp, 0xc
mov ebx, dword [eax]
push 0x43cb38
call fcn.0041dcdc
mov ecx, dword [ebp - 0x30]
add esp, 0xc
push str.fdevent_process
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push ecx
call dbg.fprintf
call sym.__errno
mov dword [eax], ebx
mov eax, dword [esi + 4]
mov edx, dword [esi + 0x10]
add eax, 0x18
push edx
push eax
mov eax, dword [ebp - 0x30]
push str.adb_win32:_signaling__s_for__x_n
push eax
call dbg.fprintf
add esp, 0x14
mov edi, dword [ebp - 0x30]
push edi
call sym._fflush
mov dword [esp], 0x43cb38
call fcn.0041dce4
add esp, 0xc
call sym.__errno
mov dword [eax], ebx
jmp 0x410d27
call sym.__errno
sub esp, 0xc
mov ebx, dword [eax]
push 0x43cb38
call fcn.0041dcdc
mov edx, dword [ebp - 0x30]
add esp, 0xc
push str._wait_for_all
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push edx
call dbg.fprintf
call sym.__errno
mov dword [eax], ebx
call fcn.0041dd24
add esp, 0xc
push eax
mov eax, dword [ebp - 0x30]
push str.Unable_to_create_main_event._Error:__d
push eax
call dbg.fprintf
pop eax
mov eax, dword [ebp - 0x30]
push eax
call sym._fflush
mov dword [esp], 0x43cb38
call fcn.0041dce4
add esp, 0xc
call sym.__errno
mov dword [eax], ebx
jmp 0x4110d8
mov ecx, dword [ebp - 0x28]
push ebx
push ebx
push 0xffffffffffffffff
push ecx
call fcn.0041dd7c
pop eax
pop edx
jmp 0x410c88