Function at 0x1007ba5b
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
lea ebp, [esp - 0x81a0]
mov eax, 0x8220
call fcn.10128500
mov eax, dword [0x10178af8]
xor eax, ebp
mov dword [ebp + 0x819c], eax
push esi
mov esi, ecx
mov al, byte [esi + 4]
test al, 0x10
je 0x1007c1fb
and al, 3
push ebx
push edi
cmp al, 3
jne 0x1007bd3e
mov eax, dword [esi + 0x18]
and dword [ebp - 0x80], 0
mov dword [ebp - 0x74], 0x100
cmp eax, 1
je 0x1007baac
cmp eax, 5
jne 0x1007bac6
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp + 0x7f9c]
push eax
push 0
lea ebx, [ebp - 0x64]
push 0x8000
mov eax, ebx
push eax
jmp 0x1007bae8
mov edi, 0xffff
push edi
call dword [0x10181090]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x1007baf8
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp + 0x7f9c]
push eax
push 0
push edi
push ebx
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov dword [ebp - 0x80], eax
test eax, eax
jg 0x1007bb06
push dword [0x1017df78]
call sym.CoreFoundation.dll_CFRetain
pop ecx
jmp 0x1007bb1a
push dword [ebp - 0x80]
push ebx
push esi
call sym.CoreFoundation.dll_CFGetAllocator
pop ecx
push eax
call sym.CoreFoundation.dll_CFDataCreate
add esp, 0xc
mov dword [ebp - 0x70], eax
test ebx, ebx
je 0x1007bb30
lea eax, [ebp - 0x64]
cmp ebx, eax
je 0x1007bb30
push ebx
call dword [0x10181098]
pop ecx
lea edi, [esi + 0xc]
push edi
mov dword [ebp - 0x78], edi
call sym.CoreFoundation.dll___CFSpinLock
mov al, byte [esi + 4]
pop ecx
test al, 0x10
jne 0x1007bb58
push dword [ebp - 0x70]
call sym.CoreFoundation.dll_CFRelease
push edi
call sym.CoreFoundation.dll___CFSpinUnlock
pop ecx
jmp 0x1007c1f8
or al, 0x20
lea ecx, [ebp + 0x7f9c]
mov byte [esi + 4], al
test ecx, ecx
je 0x1007bb85
cmp dword [ebp - 0x74], 0
jle 0x1007bb85
push dword [ebp - 0x74]
mov eax, ecx
push eax
push esi
call sym.CoreFoundation.dll_CFGetAllocator
pop ecx
push eax
call sym.CoreFoundation.dll_CFDataCreate
add esp, 0xc
jmp 0x1007bbf6
mov ecx, dword [esi + 0x18]
cmp ecx, 1
je 0x1007bb92
cmp ecx, 5
jne 0x1007bbfd
cmp dword [esi + 0x24], 0
jne 0x1007bbe8
mov dword [ebp - 0x6c], 0x100
test al, 0x10
je 0x1007bbe8
mov eax, dword [esi + 0x14]
cmp eax, 0xffffffff
je 0x1007bbe8
lea ecx, [ebp - 0x6c]
push ecx
lea ecx, [ebp + 0x809c]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
jne 0x1007bbe8
lea eax, [ebp + 0x809c]
test eax, eax
je 0x1007bbe8
cmp dword [ebp - 0x6c], 0
jle 0x1007bbe8
push dword [ebp - 0x6c]
push eax
push esi
call sym.CoreFoundation.dll_CFGetAllocator
pop ecx
push eax
call sym.CoreFoundation.dll_CFDataCreate
add esp, 0xc
mov dword [esi + 0x24], eax
mov eax, dword [esi + 0x24]
test eax, eax
je 0x1007bbfd
push eax
call sym.CoreFoundation.dll_CFRetain
pop ecx
mov dword [ebp - 0x7c], eax
test eax, eax
jne 0x1007bc0c
push dword [0x1017df78]
call sym.CoreFoundation.dll_CFRetain
pop ecx
mov dword [ebp - 0x7c], eax
xor ebx, ebx
mov edi, sym.CoreFoundation.dll_kCFTypeArrayCallBacks
cmp dword [esi + 0x4c], ebx
jne 0x1007bc2d
push edi
push ebx
push esi
call sym.CoreFoundation.dll_CFGetAllocator
pop ecx
push eax
call sym.CoreFoundation.dll_CFArrayCreateMutable
add esp, 0xc
mov dword [esi + 0x4c], eax
cmp dword [esi + 0x50], ebx
jne 0x1007bc47
push edi
push ebx
push esi
call sym.CoreFoundation.dll_CFGetAllocator
pop ecx
push eax
call sym.CoreFoundation.dll_CFArrayCreateMutable
add esp, 0xc
mov dword [esi + 0x50], eax
push dword [ebp - 0x70]
push dword [esi + 0x4c]
call sym.CoreFoundation.dll_CFArrayAppendValue
push dword [ebp - 0x70]
call sym.CoreFoundation.dll_CFRelease
push dword [ebp - 0x7c]
push dword [esi + 0x50]
call sym.CoreFoundation.dll_CFArrayAppendValue
push dword [ebp - 0x7c]
call sym.CoreFoundation.dll_CFRelease
add esp, 0x18
cmp dword [ebp - 0x80], ebx
jle 0x1007c07b
mov eax, dword [esi + 8]
test al, 3
je 0x1007c07b
test eax, 0x300
jne 0x1007c07b
cmp dword [esi + 0x28], ebx
jle 0x1007c07b
push 0x1017df60
call sym.CoreFoundation.dll___CFSpinLock
mov ebx, dword [esi + 0x14]
mov eax, dword [0x1017df74]
pop ecx
mov byte [0x1016d104], 1
mov dword [ebp - 0x70], eax
cmp ebx, 0xffffffff
je 0x1007bf03
push eax
call sym.CoreFoundation.dll_CFDataGetMutableBytePtr
push dword [ebp - 0x70]
mov edi, eax
call sym.CoreFoundation.dll_CFDataGetLength
pop ecx
pop ecx
mov dword [ebp - 0x6c], eax
test eax, eax
je 0x1007bce6
push edi
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1007bf03
cmp dword [ebp - 0x6c], 0
jle 0x1007bcf7
mov eax, dword [edi]
lea eax, [eax*4 + 8]
jmp 0x1007bcfc
mov eax, 0x1004
cmp eax, dword [ebp - 0x6c]
jle 0x1007bd1a
sub eax, dword [ebp - 0x6c]
push eax
push dword [ebp - 0x70]
call sym.CoreFoundation.dll_CFDataIncreaseLength
push dword [ebp - 0x70]
call sym.CoreFoundation.dll_CFDataGetMutableBytePtr
add esp, 0xc
mov edi, eax
mov edx, dword [edi]
xor eax, eax
test edx, edx
je 0x1007bed4
lea ecx, [edi + 4]
cmp dword [ecx], ebx
je 0x1007bed4
inc eax
add ecx, 4
cmp eax, edx
jb 0x1007bd29
jmp 0x1007bed4
cmp al, 2
jne 0x1007bf13
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp + 0x809c]
push eax
push dword [esi + 0x14]
mov dword [ebp - 0x6c], 0x100
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebp - 0x70], eax
cmp eax, 0xffffffff
je 0x1007c1f9
lea eax, [ebp + 0x809c]
test eax, eax
je 0x1007bd93
cmp dword [ebp - 0x6c], 0
jle 0x1007bd93
push dword [ebp - 0x6c]
push eax
push esi
call sym.CoreFoundation.dll_CFGetAllocator
pop ecx
push eax
call sym.CoreFoundation.dll_CFDataCreate
add esp, 0xc
jmp 0x1007bd9f
push dword [0x1017df78]
call sym.CoreFoundation.dll_CFRetain
pop ecx
lea edi, [esi + 0xc]
push edi
mov ebx, eax
mov dword [ebp - 0x78], edi
call sym.CoreFoundation.dll___CFSpinLock
mov al, byte [esi + 4]
pop ecx
test al, 0x10
jne 0x1007bdc4
push dword [ebp - 0x70]
call dword [sym.imp.WS2_32.dll_closesocket]
push ebx
jmp 0x1007bb47
or al, 0x20
xor edi, edi
mov byte [esi + 4], al
cmp dword [esi + 0x4c], edi
jne 0x1007bde5
push edi
push edi
push esi
call sym.CoreFoundation.dll_CFGetAllocator
pop ecx
push eax
call sym.CoreFoundation.dll_CFArrayCreateMutable
add esp, 0xc
mov dword [esi + 0x4c], eax
cmp dword [esi + 0x50], edi
jne 0x1007be03
push sym.CoreFoundation.dll_kCFTypeArrayCallBacks
push edi
push esi
call sym.CoreFoundation.dll_CFGetAllocator
pop ecx
push eax
call sym.CoreFoundation.dll_CFArrayCreateMutable
add esp, 0xc
mov dword [esi + 0x50], eax
push dword [ebp - 0x70]
push dword [esi + 0x4c]
call sym.CoreFoundation.dll_CFArrayAppendValue
push ebx
push dword [esi + 0x50]
call sym.CoreFoundation.dll_CFArrayAppendValue
push ebx
call sym.CoreFoundation.dll_CFRelease
mov eax, dword [esi + 8]
add esp, 0x14
test al, 2
je 0x1007c07b
test eax, 0x200
jne 0x1007c07b
cmp dword [esi + 0x28], edi
jle 0x1007c07b
push 0x1017df60
call sym.CoreFoundation.dll___CFSpinLock
mov ebx, dword [esi + 0x14]
mov eax, dword [0x1017df74]
pop ecx
mov byte [0x1016d104], 1
mov dword [ebp - 0x74], eax
cmp ebx, 0xffffffff
je 0x1007bf03
push eax
call sym.CoreFoundation.dll_CFDataGetMutableBytePtr
push dword [ebp - 0x74]
mov edi, eax
call sym.CoreFoundation.dll_CFDataGetLength
pop ecx
pop ecx
mov dword [ebp - 0x70], eax
test eax, eax
je 0x1007be89
push edi
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1007bf03
cmp dword [ebp - 0x70], 0
jle 0x1007be9a
mov eax, dword [edi]
lea eax, [eax*4 + 8]
jmp 0x1007be9f
mov eax, 0x1004
cmp eax, dword [ebp - 0x70]
jle 0x1007bebd
sub eax, dword [ebp - 0x70]
push eax
push dword [ebp - 0x74]
call sym.CoreFoundation.dll_CFDataIncreaseLength
push dword [ebp - 0x74]
call sym.CoreFoundation.dll_CFDataGetMutableBytePtr
add esp, 0xc
mov edi, eax
mov edx, dword [edi]
xor eax, eax
test edx, edx
je 0x1007bed4
lea ecx, [edi + 4]
cmp dword [ecx], ebx
je 0x1007bed4
inc eax
add ecx, 4
cmp eax, edx
jb 0x1007bec8
cmp eax, edx
jne 0x1007bee6
cmp edx, 0x400
jae 0x1007bee6
mov dword [edi + eax*4 + 4], ebx
inc dword [edi]
mov eax, dword [0x1016d108]
cmp eax, 0xffffffff
je 0x1007bf03
push 0
push 1
lea ecx, [ebp - 0x65]
push ecx
push eax
mov byte [ebp - 0x65], 0x72
call dword [sym.imp.WS2_32.dll_send]
push 0x1017df60
call sym.CoreFoundation.dll___CFSpinUnlock
pop ecx
jmp 0x1007c07b
lea edi, [esi + 0xc]
push edi
mov dword [ebp - 0x78], edi
call sym.CoreFoundation.dll___CFSpinLock
test byte [esi + 4], 0x10
pop ecx
je 0x1007c1f2
test dword [esi + 8], 0x100
jne 0x1007c1f2
cmp byte [ebp + 0x81a8], 0
je 0x1007c01f
cmp dword [esi + 0x64], 0
jne 0x1007c077
push 0x1017df60
call sym.CoreFoundation.dll___CFSpinLock
mov esi, dword [esi + 0x14]
mov eax, dword [0x1017df74]
pop ecx
mov byte [0x1016d104], 1
mov dword [ebp - 0x6c], eax
cmp esi, 0xffffffff
je 0x1007c00d
push eax
call sym.CoreFoundation.dll_CFDataGetMutableBytePtr
push dword [ebp - 0x6c]
mov edi, eax
call sym.CoreFoundation.dll_CFDataGetLength
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x1007bfa6
push edi
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1007c00d
test ebx, ebx
jle 0x1007bfa6
mov eax, dword [edi]
lea eax, [eax*4 + 8]
jmp 0x1007bfab
mov eax, 0x1004
cmp eax, ebx
jle 0x1007bfc7
sub eax, ebx
push eax
push dword [ebp - 0x6c]
call sym.CoreFoundation.dll_CFDataIncreaseLength
push dword [ebp - 0x6c]
call sym.CoreFoundation.dll_CFDataGetMutableBytePtr
add esp, 0xc
mov edi, eax
mov edx, dword [edi]
xor eax, eax
test edx, edx
je 0x1007bfde
lea ecx, [edi + 4]
cmp dword [ecx], esi
je 0x1007bfde
inc eax
add ecx, 4
cmp eax, edx
jb 0x1007bfd2
cmp eax, edx
jne 0x1007bff0
cmp edx, 0x400
jae 0x1007bff0
mov dword [edi + eax*4 + 4], esi
inc dword [edi]
mov eax, dword [0x1016d108]
cmp eax, 0xffffffff
je 0x1007c00d
push 0
push 1
lea ecx, [ebp - 0x65]
push ecx
push eax
mov byte [ebp - 0x65], 0x72
call dword [sym.imp.WS2_32.dll_send]
push 0x1017df60
call sym.CoreFoundation.dll___CFSpinUnlock
push dword [ebp - 0x78]
jmp 0x1007bb4d
mov eax, dword [esi + 0x60]
test eax, eax
je 0x1007c077
cmp byte [esi + 0x6c], 0
jne 0x1007c077
sub eax, dword [esi + 0x64]
mov ebx, eax
test ebx, ebx
jle 0x1007c077
push dword [esi + 0x5c]
call sym.CoreFoundation.dll_CFDataGetMutableBytePtr
mov edi, dword [0x10180f0c]
pop ecx
mov dword [ebp - 0x6c], eax
mov ecx, dword [esi + 0x64]
add ecx, dword [ebp - 0x6c]
mov eax, dword [esi + 0x14]
push ebx
push ecx
push eax
call dword [0x10180f30]
add esp, 0xc
cmp eax, 0xffffffff
jne 0x1007c13a
call edi
cmp dword [eax], 0xb
je 0x1007c047
call edi
mov eax, dword [eax]
mov dword [esi + 0x70], eax
mov byte [esi + 0x6c], 1
or byte [esi + 4], 0x20
push dword [esi + 0x2c]
call sym.CoreFoundation.dll_CFRunLoopSourceSignal
push dword [esi + 0x30]
call sym.CoreFoundation.dll_CFRetain
push dword [esi + 0x30]
mov dword [ebp - 0x70], eax
push 0
push dword [sym.CoreFoundation.dll_kCFAllocatorSystemDefault]
call sym.CoreFoundation.dll_CFArrayCreateMutableCopy
mov edi, dword [esi + 0x2c]
add esp, 0x14
mov ebx, eax
test edi, edi
je 0x1007c0c2
push edi
call sym.CoreFoundation.dll_CFRunLoopSourceIsValid
pop ecx
test al, al
jne 0x1007c0b7
xor edi, edi
test edi, edi
je 0x1007c0c2
push edi
call sym.CoreFoundation.dll_CFRetain
pop ecx
push dword [ebp - 0x78]
call sym.CoreFoundation.dll___CFSpinUnlock
push ebx
push edi
call fcn.10079779
add esp, 0xc
mov dword [ebp - 0x6c], eax
test edi, edi
je 0x1007c0e2
push edi
call sym.CoreFoundation.dll_CFRelease
pop ecx
cmp dword [ebp - 0x6c], 0
je 0x1007c0fa
push dword [ebp - 0x6c]
call sym.CoreFoundation.dll_CFRunLoopWakeUp
push dword [ebp - 0x6c]
call sym.CoreFoundation.dll_CFRelease
pop ecx
pop ecx
push dword [ebp - 0x78]
call sym.CoreFoundation.dll___CFSpinLock
mov edi, dword [ebp - 0x70]
pop ecx
cmp edi, dword [esi + 0x30]
jne 0x1007c117
mov dword [esi + 0x30], ebx
push edi
xor ebx, ebx
call sym.CoreFoundation.dll_CFRelease
pop ecx
push dword [ebp - 0x78]
call sym.CoreFoundation.dll___CFSpinUnlock
push edi
call sym.CoreFoundation.dll_CFRelease
pop ecx
pop ecx
test ebx, ebx
je 0x1007c1f9
push ebx
call sym.CoreFoundation.dll_CFRelease
jmp 0x1007c1f8
test eax, eax
je 0x1007c073
add dword [esi + 0x64], eax
mov eax, dword [esi + 0x64]
cmp dword [esi + 0x60], eax
je 0x1007c077
push 0x1017df60
call sym.CoreFoundation.dll___CFSpinLock
mov esi, dword [esi + 0x14]
mov eax, dword [0x1017df74]
pop ecx
mov byte [0x1016d104], 1
mov dword [ebp - 0x6c], eax
cmp esi, 0xffffffff
je 0x1007c00d
push eax
call sym.CoreFoundation.dll_CFDataGetMutableBytePtr
push dword [ebp - 0x6c]
mov edi, eax
call sym.CoreFoundation.dll_CFDataGetLength
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x1007c1ad
push edi
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1007c00d
test ebx, ebx
jle 0x1007c1ad
mov eax, dword [edi]
lea eax, [eax*4 + 8]
jmp 0x1007c1b2
mov eax, 0x1004
cmp eax, ebx
jle 0x1007c1ce
sub eax, ebx
push eax
push dword [ebp - 0x6c]
call sym.CoreFoundation.dll_CFDataIncreaseLength
push dword [ebp - 0x6c]
call sym.CoreFoundation.dll_CFDataGetMutableBytePtr
add esp, 0xc
mov edi, eax
mov edx, dword [edi]
xor eax, eax
test edx, edx
je 0x1007bfde
lea ecx, [edi + 4]
cmp dword [ecx], esi
je 0x1007bfde
inc eax
add ecx, 4
cmp eax, edx
jb 0x1007c1dd
jmp 0x1007bfde
push edi
call sym.CoreFoundation.dll___CFSpinUnlock
pop ecx
pop edi
pop ebx
mov ecx, dword [ebp + 0x819c]
xor ecx, ebp
pop esi
call fcn.10128342
add ebp, 0x81a0
leave
ret