Function at 0x4051c2
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
cmp byte [section..data], 5
push edi
mov edi, dword [ebp + 8]
jb 0x4051ed
movzx eax, word [edi]
push eax
push dword [edi + 2]
push str.ms_sco_read_thread_start:_BD_ADDR__08x_04x
push esi
call fcn.00421c1f
add esp, 0x10
mov edx, edi
call fcn.00401878
test eax, eax
je 0x405216
cmp byte [section..data], 5
jb 0x40520e
push str.ms_sco_read_thread_start:_SCO_control_blocs_exists_already
push esi
call fcn.00421c1f
pop ecx
pop ecx
xor eax, eax
inc eax
jmp 0x4053cc
call fcn.00405154
mov edi, eax
cmp edi, esi
jne 0x40523e
cmp byte [section..data], 1
jb 0x405237
push str._ms_sco_read_thread_start:_unused_control_block_isnt_found
push esi
call fcn.00421c1f
pop ecx
pop ecx
xor eax, eax
jmp 0x4053cc
cmp byte [section..data], 5
jb 0x405254
push str.ms_sco_read_thread_start:_before_CreateFile_for_h_device
push esi
call fcn.00421c1f
pop ecx
pop ecx
push ebx
mov ebx, dword [0x467348]
push esi
push esi
push 3
push esi
push 2
push 0x40000000
push str..BTWAVDT
call ebx
cmp eax, 0xffffffff
mov dword [edi + 0xc], eax
jne 0x405299
cmp byte [section..data], 1
jb 0x4053a2
mov ebx, dword [0x467358]
call ebx
push eax
call ebx
push eax
push str._ms_sco_read_thread_start:_CreateFile_failed._GetLastError_d__0x_x_
jmp 0x405399
cmp byte [section..data], 5
jb 0x4052af
push str.ms_sco_read_thread_start:_before_CreateFile_for_h_device_poll
push esi
call fcn.00421c1f
pop ecx
pop ecx
push esi
push esi
push 3
push esi
push 2
push 0x40000000
push str..BTWAVDT
call ebx
cmp eax, 0xffffffff
mov dword [edi + 0x10], eax
jne 0x4052ed
cmp byte [section..data], 1
jb 0x4053a2
mov ebx, dword [0x467358]
call ebx
push eax
call ebx
push eax
push str._ms_sco_read_thread_start:_poll_CreateFile_failed._GetLastError_d__0x_x_
jmp 0x405399
lea eax, [edi + 4]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.0042c312
cmp byte [section..data], 5
pop ecx
pop ecx
jb 0x405312
push str.ms_sco_read_thread_start:_about_to_register_SCO_channel
push esi
call fcn.00421c1f
pop ecx
pop ecx
push esi
lea eax, [ebp - 4]
push eax
push esi
push esi
push 8
lea eax, [ebp - 0xc]
push eax
push 0xf8ed0c84
push dword [edi + 0xc]
call dword [0x467354]
test eax, eax
jne 0x40534d
cmp byte [section..data], 1
jb 0x4053a2
mov ebx, dword [0x467358]
call ebx
push eax
call ebx
push eax
push str._ms_sco_read_thread_start:_DeviceIoControl_BTWAVDT_SCO_REGISTER_CHANNEL___failed__GetLastError___d__0x_x_
jmp 0x405399
cmp byte [section..data], 5
jb 0x405363
push str.ms_sco_read_thread_start:_before__beginthreadex
push esi
call fcn.00421c1f
pop ecx
pop ecx
lea eax, [ebp - 4]
push eax
push esi
push edi
push 0x401ead
push esi
push esi
call fcn.00436914
add esp, 0x18
cmp eax, esi
mov dword [edi + 0x14], eax
jne 0x4053b2
cmp byte [section..data], 1
jb 0x4053a2
mov ebx, dword [0x467358]
call ebx
push eax
call ebx
push eax
push str._ms_sco_read_thread_start:_CreateThread_failed__GetLastError___d__0x_x_
push esi
call fcn.00421c1f
add esp, 0x10
push esi
push 1
mov eax, edi
call fcn.00401b5b
pop ecx
pop ecx
xor eax, eax
jmp 0x4053cb
cmp byte [section..data], 5
jb 0x4053c8
push str.ms_sco_read_thread_start:_exits
push esi
call fcn.00421c1f
pop ecx
pop ecx
xor eax, eax
inc eax
pop ebx
pop edi
pop esi
leave
ret