Function at 0x4ca020
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x158
mov ebx, dword [ebp + 8]
mov dword [esp + 0x18], 0
test ebx, ebx
je 0x4ca069
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
cmp ecx, 0xffffffff
je 0x4ca07d
mov edx, eax
xor edx, ecx
cmp edx, 0x12345678
jne 0x4ca07d
cmp dword [ebx + 4], 0
je 0x4ca0a7
mov dword [esp + 8], ebx
mov dword [esp + 4], str.dnssd_clientstub_DNSServiceProcessResult_undefined_for_kDNSServiceFlagsShareConnection_subordinate_DNSServiceRef__p
jmp 0x4ca091
mov dword [esp + 4], str.dnssd_clientstub_DNSServiceProcessResult_called_with_NULL_DNSServiceRef
call fcn.004c9fc0
mov esi, 0xfffefffc
jmp 0x4ca09b
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], str.dnssd_clientstub_DNSServiceProcessResult_called_with_invalid_DNSServiceRef__p__08X__08X
call fcn.004c9fc0
mov esi, 0xfffefffb
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 4
cmp dword [ebx + 0x28], 0
je 0x4ca28a
lea esi, [esp + 0x28]
jmp 0x4ca0c3
mov ecx, dword [ebx + 8]
mov edx, esi
mov dword [esp], 0x1c
call fcn.004ca360
cmp eax, 0xfffffffe
je 0x4ca31a
cmp eax, 0xffffffff
je 0x4ca349
mov dword [esp], esi
call fcn.004cd240
mov eax, dword [esp + 0x28]
cmp eax, 1
jne 0x4ca2cd
mov esi, dword [esp + 0x2c]
mov dword [esp], esi
call sub.msvcrt.dll_malloc
test eax, eax
je 0x4ca2f7
mov ecx, dword [ebx + 8]
mov edx, eax
mov edi, eax
mov dword [esp], esi
call fcn.004ca360
test eax, eax
js 0x4ca301
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], edi
add eax, edi
mov dword [esp + 4], eax
lea eax, [esp + 0x1c]
mov esi, eax
mov dword [esp], eax
call fcn.004cd0c0
mov dword [esp + 0x44], eax
mov dword [esp], esi
mov eax, dword [esp + 0x2c]
add eax, edi
mov dword [esp + 4], eax
call fcn.004cd0c0
mov dword [esp + 0x48], eax
mov dword [esp], esi
mov eax, dword [esp + 0x2c]
add eax, edi
mov dword [esp + 4], eax
call fcn.004cd0c0
mov dword [esp + 0x4c], eax
mov esi, dword [ebx + 8]
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
cmp esi, 0x3f
ja 0x4ca1a0
mov dword [esp + 0x50], 0
lea ebx, [esp + 0x50]
jmp 0x4ca1bc
mov eax, esi
mov dword [esp + 4], 4
shr eax, 5
inc eax
mov dword [esp], eax
call sub.msvcrt.dll_calloc
test eax, eax
je 0x4ca223
mov ebx, eax
mov dword [ebx + 4], esi
inc esi
lea eax, [esp + 0x20]
mov dword [ebx], 1
mov dword [esp + 4], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
mov dword [esp], esi
call dword [sym.imp.WS2_32.dll_select]
sub esp, 0x14
lea ecx, [esp + 0x50]
mov esi, eax
cmp ebx, ecx
je 0x4ca200
mov dword [esp], ebx
call fcn.00537860
xor eax, eax
test esi, esi
setg al
mov dword [esp + 0x18], eax
jle 0x4ca238
mov ebx, dword [ebp + 8]
or byte [esp + 0x44], 1
lea eax, [esp + 0x18]
mov dword [ebx + 0x24], eax
mov eax, 1
jmp 0x4ca23d
mov dword [esp + 4], str.dnssd_clientstub_more_bytes:_malloc_failed
call fcn.004c9fc0
mov dword [esp + 0x18], 0
mov ebx, dword [ebp + 8]
xor eax, eax
mov ecx, dword [esp + 0x1c]
lea esi, [esp + 0x28]
test ecx, ecx
je 0x4ca265
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov dword [esp], ebx
add eax, edi
mov dword [esp + 0xc], eax
call dword [ebx + 0x28]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4ca270
mov dword [ebx + 0x24], 0
mov dword [esp], edi
call fcn.00537860
cmp dword [esp + 0x18], 0
jne 0x4ca0c0
xor esi, esi
jmp 0x4ca09b
mov eax, dword [0x5d99d0]
cmp eax, 9
jg 0x4ca2a6
mov dword [esp + 4], str.dnssd_clientstub_DNSServiceProcessResult_called_with_DNSServiceRef_with_no_ProcessReply_function
call fcn.004c9fc0
mov eax, dword [0x5d99d0]
cmp eax, 0x3e7
jg 0x4ca2b8
inc eax
mov dword [0x5d99d0], eax
jmp 0x4ca096
mov dword [esp], 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
jmp 0x4ca096
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
mov dword [esp + 4], str.dnssd_clientstub_DNSServiceProcessResult_daemon_version__d_does_not_match_client_version__d
call fcn.004c9fc0
mov dword [ebx + 0x28], 0
mov esi, 0xfffefff1
jmp 0x4ca09b
mov esi, 0xfffefffd
jmp 0x4ca09b
mov dword [ebx + 0x28], 0
mov dword [esp], edi
call fcn.00537860
mov esi, 0xfffeffe5
jmp 0x4ca09b
xor esi, esi
cmp dword [esp + 0x18], 0
je 0x4ca09b
mov eax, dword [ebx + 0x20]
cmp eax, 0x63
ja 0x4ca09b
inc eax
mov dword [ebx + 0x20], eax
mov dword [esp + 4], str.dnssd_clientstub_DNSServiceProcessResult_error:_select_indicated_data_was_waiting_but_read_all_returned_EWOULDBLOCK
call fcn.004c9fc0
jmp 0x4ca09b
mov dword [ebx + 0x28], 0
mov esi, 0xfffeffe5
jmp 0x4ca09b