Function at 0x1007ba9c
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.10128540
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 0x1007c23c
and al, 3
push ebx
push edi
cmp al, 3
jne 0x1007bd7f
mov eax, dword [esi + 0x18]
and dword [ebp - 0x80], 0
mov dword [ebp - 0x74], 0x100
cmp eax, 1
je 0x1007baed
cmp eax, 5
jne 0x1007bb07
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 0x1007bb29
mov edi, 0xffff
push edi
call dword [0x10181090]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x1007bb39
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 0x1007bb47
push dword [0x1017df78]
call sym.CoreFoundation.dll_CFRetain
pop ecx
jmp 0x1007bb5b
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 0x1007bb71
lea eax, [ebp - 0x64]
cmp ebx, eax
je 0x1007bb71
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 0x1007bb99
push dword [ebp - 0x70]
call sym.CoreFoundation.dll_CFRelease
push edi
call sym.CoreFoundation.dll___CFSpinUnlock
pop ecx
jmp 0x1007c239
or al, 0x20
lea ecx, [ebp + 0x7f9c]
mov byte [esi + 4], al
test ecx, ecx
je 0x1007bbc6
cmp dword [ebp - 0x74], 0
jle 0x1007bbc6
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 0x1007bc37
mov ecx, dword [esi + 0x18]
cmp ecx, 1
je 0x1007bbd3
cmp ecx, 5
jne 0x1007bc3e
cmp dword [esi + 0x24], 0
jne 0x1007bc29
mov dword [ebp - 0x6c], 0x100
test al, 0x10
je 0x1007bc29
mov eax, dword [esi + 0x14]
cmp eax, 0xffffffff
je 0x1007bc29
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 0x1007bc29
lea eax, [ebp + 0x809c]
test eax, eax
je 0x1007bc29
cmp dword [ebp - 0x6c], 0
jle 0x1007bc29
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 0x1007bc3e
push eax
call sym.CoreFoundation.dll_CFRetain
pop ecx
mov dword [ebp - 0x7c], eax
test eax, eax
jne 0x1007bc4d
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 0x1007bc6e
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 0x1007bc88
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 0x1007c0bc
mov eax, dword [esi + 8]
test al, 3
je 0x1007c0bc
test eax, 0x300
jne 0x1007c0bc
cmp dword [esi + 0x28], ebx
jle 0x1007c0bc
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 0x1007bf44
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 0x1007bd27
push edi
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1007bf44
cmp dword [ebp - 0x6c], 0
jle 0x1007bd38
mov eax, dword [edi]
lea eax, [eax*4 + 8]
jmp 0x1007bd3d
mov eax, 0x1004
cmp eax, dword [ebp - 0x6c]
jle 0x1007bd5b
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 0x1007bf15
lea ecx, [edi + 4]
cmp dword [ecx], ebx
je 0x1007bf15
inc eax
add ecx, 4
cmp eax, edx
jb 0x1007bd6a
jmp 0x1007bf15
cmp al, 2
jne 0x1007bf54
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 0x1007c23a
lea eax, [ebp + 0x809c]
test eax, eax
je 0x1007bdd4
cmp dword [ebp - 0x6c], 0
jle 0x1007bdd4
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 0x1007bde0
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 0x1007be05
push dword [ebp - 0x70]
call dword [sym.imp.WS2_32.dll_closesocket]
push ebx
jmp 0x1007bb88
or al, 0x20
xor edi, edi
mov byte [esi + 4], al
cmp dword [esi + 0x4c], edi
jne 0x1007be26
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 0x1007be44
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 0x1007c0bc
test eax, 0x200
jne 0x1007c0bc
cmp dword [esi + 0x28], edi
jle 0x1007c0bc
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 0x1007bf44
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 0x1007beca
push edi
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1007bf44
cmp dword [ebp - 0x70], 0
jle 0x1007bedb
mov eax, dword [edi]
lea eax, [eax*4 + 8]
jmp 0x1007bee0
mov eax, 0x1004
cmp eax, dword [ebp - 0x70]
jle 0x1007befe
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 0x1007bf15
lea ecx, [edi + 4]
cmp dword [ecx], ebx
je 0x1007bf15
inc eax
add ecx, 4
cmp eax, edx
jb 0x1007bf09
cmp eax, edx
jne 0x1007bf27
cmp edx, 0x400
jae 0x1007bf27
mov dword [edi + eax*4 + 4], ebx
inc dword [edi]
mov eax, dword [0x1016d108]
cmp eax, 0xffffffff
je 0x1007bf44
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 0x1007c0bc
lea edi, [esi + 0xc]
push edi
mov dword [ebp - 0x78], edi
call sym.CoreFoundation.dll___CFSpinLock
test byte [esi + 4], 0x10
pop ecx
je 0x1007c233
test dword [esi + 8], 0x100
jne 0x1007c233
cmp byte [ebp + 0x81a8], 0
je 0x1007c060
cmp dword [esi + 0x64], 0
jne 0x1007c0b8
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 0x1007c04e
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 0x1007bfe7
push edi
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1007c04e
test ebx, ebx
jle 0x1007bfe7
mov eax, dword [edi]
lea eax, [eax*4 + 8]
jmp 0x1007bfec
mov eax, 0x1004
cmp eax, ebx
jle 0x1007c008
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 0x1007c01f
lea ecx, [edi + 4]
cmp dword [ecx], esi
je 0x1007c01f
inc eax
add ecx, 4
cmp eax, edx
jb 0x1007c013
cmp eax, edx
jne 0x1007c031
cmp edx, 0x400
jae 0x1007c031
mov dword [edi + eax*4 + 4], esi
inc dword [edi]
mov eax, dword [0x1016d108]
cmp eax, 0xffffffff
je 0x1007c04e
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 0x1007bb8e
mov eax, dword [esi + 0x60]
test eax, eax
je 0x1007c0b8
cmp byte [esi + 0x6c], 0
jne 0x1007c0b8
sub eax, dword [esi + 0x64]
mov ebx, eax
test ebx, ebx
jle 0x1007c0b8
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 0x1007c17b
call edi
cmp dword [eax], 0xb
je 0x1007c088
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 0x1007c103
push edi
call sym.CoreFoundation.dll_CFRunLoopSourceIsValid
pop ecx
test al, al
jne 0x1007c0f8
xor edi, edi
test edi, edi
je 0x1007c103
push edi
call sym.CoreFoundation.dll_CFRetain
pop ecx
push dword [ebp - 0x78]
call sym.CoreFoundation.dll___CFSpinUnlock
push ebx
push edi
call fcn.100797ba
add esp, 0xc
mov dword [ebp - 0x6c], eax
test edi, edi
je 0x1007c123
push edi
call sym.CoreFoundation.dll_CFRelease
pop ecx
cmp dword [ebp - 0x6c], 0
je 0x1007c13b
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 0x1007c158
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 0x1007c23a
push ebx
call sym.CoreFoundation.dll_CFRelease
jmp 0x1007c239
test eax, eax
je 0x1007c0b4
add dword [esi + 0x64], eax
mov eax, dword [esi + 0x64]
cmp dword [esi + 0x60], eax
je 0x1007c0b8
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 0x1007c04e
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 0x1007c1ee
push edi
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1007c04e
test ebx, ebx
jle 0x1007c1ee
mov eax, dword [edi]
lea eax, [eax*4 + 8]
jmp 0x1007c1f3
mov eax, 0x1004
cmp eax, ebx
jle 0x1007c20f
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 0x1007c01f
lea ecx, [edi + 4]
cmp dword [ecx], esi
je 0x1007c01f
inc eax
add ecx, 4
cmp eax, edx
jb 0x1007c21e
jmp 0x1007c01f
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.10128382
add ebp, 0x81a0
leave
ret