Function at 0x40a460
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
mov esi, edx
mov dword [esp + 0x18], 0
mov ebx, ecx
push edi
mov cl, byte [esi + 4]
mov byte [esp + 0xf], cl
lea edi, [ebx + 0x1fc0]
mov ecx, dword [esi + 0x78]
mov dword [esp + 0x10], edi
cmp ecx, 2
je 0x40a4d9
cmp ecx, 3
je 0x40a4d9
mov eax, dword [edi]
test eax, eax
je 0x40a4b0
nop dword [eax]
cmp eax, esi
je 0x40a520
mov edi, eax
mov dword [esp + 0x10], eax
mov eax, dword [edi]
test eax, eax
jne 0x40a4a0
mov eax, dword [ebx + 0x1fc4]
lea edi, [ebx + 0x1fc4]
test eax, eax
je 0x40a5cd
cmp eax, esi
je 0x40a7dc
mov edi, eax
mov eax, dword [edi]
test eax, eax
jne 0x40a4c4
jmp 0x40a5cd
push dword [esi + 0x20]
mov ecx, dword [esi + 0x20]
push dword [esi + 0x14]
call fcn.00404580
xor edx, edx
mov ecx, 0x1f3
div ecx
lea ecx, [ebx + 0x10f4]
call fcn.004084c0
test eax, eax
je 0x40ab83
lea edi, [eax + 8]
mov eax, dword [edi]
mov dword [esp + 0x10], edi
test eax, eax
je 0x40a520
cmp eax, esi
je 0x40a51c
mov edi, eax
mov eax, dword [edi]
test eax, eax
jne 0x40a510
mov dword [esp + 0x10], edi
cmp dword [edi], 0
je 0x40a4b0
cmp dword [ebp + 8], 2
jne 0x40a60d
mov edi, dword [ebx + 0x1fc4]
test edi, edi
je 0x40a5c9
nop dword [eax]
mov eax, dword [edi + 0x1c]
cmp eax, dword [esi + 0x1c]
jne 0x40a5bf
mov cl, byte [edi + 4]
lea eax, [edi + 4]
mov dl, byte [esi + 4]
cmp cl, dl
je 0x40a567
mov al, cl
or al, dl
cmp al, 0x12
je 0x40a567
cmp cl, 1
je 0x40a567
cmp dl, 1
jne 0x40a5bf
mov ax, word [edi + 6]
cmp ax, word [esi + 6]
jne 0x40a5bf
mov ax, word [edi + 8]
cmp ax, word [esi + 8]
jne 0x40a5bf
mov eax, dword [edi + 0x14]
cmp eax, dword [esi + 0x14]
jne 0x40a5bf
mov ax, word [edi + 0x10]
cmp ax, word [esi + 0x10]
jne 0x40a5bf
mov eax, dword [edi + 0x18]
cmp eax, dword [esi + 0x18]
jne 0x40a5bf
mov edx, dword [esi + 0x24]
lea ecx, [edi + 4]
push fcn.004018b0
add edx, 4
call fcn.00402d40
test eax, eax
je 0x40a5bf
push dword [esi + 0x20]
push dword [edi + 0x20]
call fcn.004018b0
test eax, eax
je 0x40a5bf
mov byte [edi + 0x7d], 0xff
mov edi, dword [edi]
test edi, edi
jne 0x40a540
mov edi, dword [esp + 0x10]
lea ecx, [esi + 4]
cmp dword [edi], 0
jne 0x40a7f6
cmp dword [ebp + 8], 3
je 0x40a5ff
mov edx, dword [esi + 0x24]
lea eax, [ebx + 0x37]
push eax
add edx, 4
call fcn.00401290
push eax
push esi
push str.mDNS_Deregister_internal:_Record__p_not_found_in_list__s
push 0
call fcn.0041dc40
add esp, 0x10
mov eax, 0xfffefffb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp dword [ebx + 0x1fc4], 0
lea ecx, [ebx + 0x1fc4]
je 0x40a5cd
mov edi, ecx
nop
mov edx, dword [edi]
mov eax, dword [edx + 0x1c]
cmp eax, dword [esi + 0x1c]
jne 0x40a6a4
mov cl, byte [edx + 4]
lea eax, [edx + 4]
mov dword [esp + 0x18], eax
mov ah, byte [esi + 4]
cmp cl, ah
je 0x40a64d
mov al, cl
or al, ah
cmp al, 0x12
je 0x40a64d
cmp cl, 1
je 0x40a64d
cmp ah, 1
jne 0x40a6a4
mov ax, word [edx + 6]
cmp ax, word [esi + 6]
jne 0x40a6a4
mov ax, word [edx + 8]
cmp ax, word [esi + 8]
jne 0x40a6a4
mov eax, dword [edx + 0x14]
cmp eax, dword [esi + 0x14]
jne 0x40a6a4
mov ax, word [edx + 0x10]
cmp ax, word [esi + 0x10]
jne 0x40a6a4
mov eax, dword [edx + 0x18]
cmp eax, dword [esi + 0x18]
jne 0x40a6a4
mov edx, dword [esi + 0x24]
mov ecx, dword [esp + 0x18]
add edx, 4
push fcn.004018b0
call fcn.00402d40
test eax, eax
je 0x40a6a4
mov eax, dword [edi]
push dword [esi + 0x20]
push dword [eax + 0x20]
call fcn.004018b0
test eax, eax
jne 0x40a6af
mov edi, dword [edi]
cmp dword [edi], 0
jne 0x40a620
mov edx, dword [edi]
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x18], edx
test edx, edx
je 0x40a5cd
mov ecx, dword [esp + 0x14]
mov eax, dword [edx]
mov dword [ecx], eax
mov eax, dword [esi + 0x78]
cmp eax, 2
je 0x40a6e2
cmp eax, 3
je 0x40a6e2
mov eax, dword [esi]
mov dword [edx], eax
mov dword [esi], edx
jmp 0x40a724
mov dword [edx], 0
mov ecx, ebx
push edx
lea edx, [ebx + 0x10f4]
call fcn.004086d0
test eax, eax
jne 0x40a720
mov ecx, dword [esp + 0x18]
lea eax, [ebx + 0x37]
push eax
mov edx, dword [ecx + 0x24]
add ecx, 4
add edx, 4
call fcn.00401290
push eax
push str.mDNS_Deregister_internal:_ERROR___cannot_insert__s
push 0
call fcn.0041dc40
add esp, 0xc
mov edx, dword [esp + 0x18]
mov al, byte [esi + 4]
lea ecx, [esi + 4]
mov byte [edx + 4], al
mov al, byte [esi + 0x7d]
mov byte [edx + 0x7d], al
mov al, byte [esi + 0x7e]
mov byte [edx + 0x7e], al
mov al, byte [esi + 0x7f]
mov byte [edx + 0x7f], al
mov al, byte [esi + 0x80]
mov byte [edx + 0x80], al
mov eax, dword [esi + 0x88]
mov dword [edx + 0x88], eax
mov al, byte [esi + 0x82]
mov byte [edx + 0x82], al
mov eax, dword [esi + 0x8c]
mov dword [edx + 0x8c], eax
mov eax, dword [esi + 0x94]
mov dword [edx + 0x94], eax
movups xmm0, xmmword [esi + 0x98]
movups xmmword [edx + 0x98], xmm0
mov eax, dword [esi + 0xb4]
mov dword [edx + 0xb4], eax
mov eax, dword [esi + 0xb8]
mov dword [edx + 0xb8], eax
mov eax, dword [esi + 0xbc]
mov dword [edx + 0xbc], eax
mov eax, dword [esi + 0xc0]
mov dword [edx + 0xc0], eax
mov eax, dword [esi + 0xe8]
mov dword [edx + 0xe8], eax
mov eax, dword [esi + 0xdc]
mov dword [edx + 0xdc], eax
mov word [esi + 0x7f], 0
jmp 0x40a5d0
cmp dword [edi], 0
je 0x40a5cd
mov byte [esi + 0x7f], 0
mov dword [esp + 0x1c], 1
jmp 0x40a5cd
cmp dword [esi + 0x1c], 0
jne 0x40a8b8
cmp byte [esi + 0x46], 0
jne 0x40a8b8
mov ecx, dword [esi + 0x20]
call fcn.00401a00
test eax, eax
jne 0x40a8b8
cmp byte [esi + 0x7f], al
je 0x40a857
mov ecx, dword [esi + 0xf8]
test ecx, ecx
je 0x40a838
call fcn.004205e0
mov dword [esi + 0xf8], 0
mov byte [esi + 4], 1
mov edx, esi
mov ecx, ebx
mov byte [ebx + 0x114], 1
call fcn.00426a50
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x134], 0
mov ax, word [0x43da2c]
mov word [esi + 0xec], ax
je 0x40a884
lea edx, [esi + 0xfc]
mov ecx, ebx
call fcn.0041ee70
mov dword [esi + 0x134], 0
mov edx, dword [esi + 0xf4]
test edx, edx
je 0x40a89f
mov ecx, ebx
call fcn.00419610
mov dword [esi + 0xf4], 0
mov ecx, dword [esi + 0xf8]
test ecx, ecx
je 0x40a8b8
call fcn.004205e0
mov dword [esi + 0xf8], 0
mov al, byte [esp + 0xf]
test al, al
jne 0x40a939
mov edx, dword [esi + 0x24]
lea eax, [ebx + 0x37]
push eax
add edx, 4
lea ecx, [esi + 4]
call fcn.00401290
push eax
push str.mDNS_Deregister_internal:__s_already_marked_kDNSRecordTypeUnregistered
push 0
call fcn.0041dc40
mov al, byte [esp + 0x1b]
add esp, 0xc
cmp dword [esi + 0x4a], 0
jne 0x40aaf1
cmp al, 8
jne 0x40a90b
cmp byte [esi + 0x7f], 0
jne 0x40aaf1
cmp byte [esi + 0x80], 0
jne 0x40aaf1
cmp dword [esp + 0x1c], 0
jne 0x40a96d
mov eax, dword [esi + 0x78]
cmp eax, 2
je 0x40a91f
cmp eax, 3
jne 0x40a96d
push esi
lea edx, [ebx + 0x10f4]
mov ecx, ebx
call fcn.00408770
cmp dword [eax + 0x14], esi
jne 0x40a981
mov ecx, dword [esi]
mov dword [eax + 0x14], ecx
jmp 0x40a981
cmp al, 1
jne 0x40a8e6
mov edx, dword [esi + 0x24]
lea eax, [ebx + 0x37]
push eax
add edx, 4
lea ecx, [esi + 4]
call fcn.00401290
push eax
push str.mDNS_Deregister_internal:__s_already_marked_kDNSRecordTypeDeregistering
push 0
call fcn.0041dc40
add esp, 0xc
mov eax, 0xfffefffb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi]
mov dword [edi], eax
cmp dword [ebx + 0x1fc8], esi
jne 0x40a981
mov eax, dword [esi]
mov dword [ebx + 0x1fc8], eax
cmp dword [ebx + 0x1fcc], esi
jne 0x40a991
mov eax, dword [esi]
mov dword [ebx + 0x1fcc], eax
cmp dword [esi + 0xc4], 0
mov dword [esi], 0
mov byte [esi + 4], 0
je 0x40a9ad
mov edx, esi
mov ecx, ebx
call fcn.0040a410
cmp dword [ebp + 8], 2
je 0x40aa4b
mov eax, dword [ebx + 0x30]
mov ecx, dword [ebx + 0x2c]
inc eax
mov dword [ebx + 0x30], eax
cmp ecx, eax
je 0x40a9db
push eax
push ecx
push str.mDNS_Deregister_internal
push str._s:_Locking_Failure__mDNS_busy___ld____mDNS_reentrancy___ld_
push 0
call fcn.0041dc40
add esp, 0x14
cmp dword [0x44f480], 0
je 0x40aa06
mov edx, dword [esi + 0x24]
lea eax, [ebx + 0x37]
push eax
add edx, 4
lea ecx, [esi + 4]
call fcn.00401290
push eax
push str.mDNS_Deregister_internal:_mStatus_MemFree_for__s
push 3
call fcn.0041dc40
add esp, 0xc
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x40aa16
push 0xfffeff00
push esi
push ebx
call eax
mov eax, dword [ebx + 0x2c]
mov ecx, dword [ebx + 0x30]
cmp eax, ecx
je 0x40aa36
push ecx
push eax
push str.mDNS_Deregister_internal
push str._s:_Unlocking_Failure__mDNS_busy___ld____mDNS_reentrancy___ld_
push 0
call fcn.0041dc40
add esp, 0x14
dec dword [ebx + 0x30]
mov ecx, ebx
call fcn.00411f70
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, esi
mov ecx, ebx
call fcn.0040a3b0
mov eax, dword [ebx + 0x30]
mov ecx, dword [ebx + 0x2c]
inc eax
mov dword [ebx + 0x30], eax
cmp ecx, eax
je 0x40aa78
push eax
push ecx
push str.mDNS_Deregister_internal
push str._s:_Locking_Failure__mDNS_busy___ld____mDNS_reentrancy___ld_
push 0
call fcn.0041dc40
add esp, 0x14
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x40aa88
push 0xfffefff4
push esi
push ebx
call eax
mov eax, dword [ebx + 0x2c]
mov ecx, dword [ebx + 0x30]
cmp eax, ecx
je 0x40aaa8
push ecx
push eax
push str.mDNS_Deregister_internal
push str._s:_Unlocking_Failure__mDNS_busy___ld____mDNS_reentrancy___ld_
push 0
call fcn.0041dc40
add esp, 0x14
dec dword [ebx + 0x30]
mov eax, dword [ebx + 0x1fc4]
test eax, eax
je 0x40ab7c
nop dword [eax]
cmp byte [eax + 0x7d], 0xff
je 0x40aaca
mov eax, dword [eax]
jmp 0x40aadb
push 2
mov edx, eax
mov ecx, ebx
call fcn.0040a460
mov eax, dword [ebx + 0x1fc4]
test eax, eax
jne 0x40aac0
mov ecx, ebx
call fcn.00411f70
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov byte [esi + 4], 1
mov dword [esi + 0xc], 0
cmp dword [esi + 0x4a], 0
je 0x40ab09
mov eax, 0x12
jmp 0x40ab19
xor eax, eax
cmp dword [ebp + 8], 1
setne al
lea eax, [eax*2 + 1]
mov edi, dword [0x44f49c]
mov byte [esi + 0x7e], al
lea ecx, [edi + edi]
mov dword [esi + 0xb4], ecx
mov eax, dword [ebx + 0xdc]
sub eax, ecx
mov dword [esi + 0xb8], eax
mov eax, 0x66666667
mov ecx, dword [ebx + 0xfc]
imul edi
mov byte [ebx + 0x114], 1
sar edx, 2
mov esi, edx
shr esi, 0x1f
add esi, edx
sub ecx, esi
mov esi, dword [ebx + 0xdc]
sub ecx, esi
js 0x40ab7c
mov eax, 0x66666667
imul edi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
add eax, esi
mov dword [ebx + 0xfc], eax
mov ecx, ebx
call fcn.00411f70
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4