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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x11c
mov eax, dword [0x1010f16c]
xor eax, esp
mov dword [esp + 0x118], eax
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0x1c], esi
mov al, byte [esi + 0xe]
cmp al, 3
jne 0x10004bbf
cmp byte [esi + 0xc], 0
jne 0x100049e6
mov ecx, dword [esi + 4]
mov edi, dword [ecx + 0x98]
test edi, edi
je 0x10004965
mov eax, dword [edi]
dec dword [ecx + 0x94]
mov dword [ecx + 0x98], eax
lea eax, [edi + 0x84]
mov dword [edi + 0x20], eax
mov dword [edi + 0x1c], 0
jmp 0x1000496c
call fcn.100566d0
mov edi, eax
test edi, edi
je 0x100049e6
xorps xmm0, xmm0
movups xmmword [edi], xmm0
mov dword [edi + 0x10], 0
mov byte [edi + 0x24], 0
mov dword [edi + 0x14], esi
push 0
push edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0x76c
mov eax, dword [edi + 0x20]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
push eax
push 0
push 1
lea eax, [esp + 0x24]
push eax
push dword [esi + 0x18]
call dword [sym.imp.WS2_32.dll_WSARecv]
test eax, eax
je 0x100049e2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x100049e2
push eax
push str.TcpSocketWin32:WSARecv_failed_0x_X
call fcn.10056110
add esp, 8
push edi
push 0x10115c70
call dword [sym.imp.KERNEL32.dll_InterlockedPushEntrySList]
jmp 0x100049e6
mov byte [esi + 0xc], 1
lea eax, [esi + 0x30]
mov ecx, eax
mov dword [esp + 0x18], eax
call fcn.100045a0
mov edi, eax
test edi, edi
je 0x10004a88
nop
mov al, byte [esi + 0x11]
mov byte [edi + 0x25], al
movups xmm0, xmmword [esi + 0x1b8]
movups xmmword [edi + 0x28], xmm0
movq xmm0, qword [esi + 0x1c8]
movq qword [edi + 0x38], xmm0
mov eax, dword [esi + 0x1d0]
mov dword [edi + 0x40], eax
mov eax, dword [esi + 8]
add eax, 0x28
mov dword [edi + 0x14], eax
mov ebx, dword [esi + 8]
mov dword [edi], 0
lea eax, [ebx + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov eax, dword [ebx + 4]
inc dword [ebx + 8]
mov dword [eax], edi
lea eax, [ebx + 0x10]
cmp dword [ebx + 0xc], 0
mov dword [ebx + 4], edi
push eax
je 0x10004a70
mov dword [ebx + 0xc], 0
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
push dword [ebx + 0x14]
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x10004a76
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
lea ecx, [esi + 0x30]
call fcn.100045a0
mov edi, eax
test edi, edi
jne 0x10004a00
cmp byte [esi + 0x30], 0
je 0x10004aaa
mov eax, dword [esi + 0x18]
cmp eax, 0xffffffff
je 0x10004a9d
push eax
call dword [sym.imp.KERNEL32.dll_CancelIo]
mov byte [esi + 0xe], 1
mov byte [esi + 0x11], 0
jmp 0x10004be1
cmp byte [esi + 0xd], 0
jne 0x10004bf5
mov edi, dword [esi + 0x20]
lea eax, [esi + 0x20]
xor ebx, ebx
mov dword [esp + 0x10], eax
test edi, edi
je 0x10004bf5
lea eax, [esi + 0x1d4]
mov esi, dword [esp + 0x18]
mov dword [esp + 0xc], eax
cmp byte [edi + 0x26], 0
jne 0x10004ae4
push edi
mov ecx, esi
call fcn.100042b0
mov eax, dword [edi + 0x20]
mov dword [esp + ebx*8 + 0x24], eax
mov eax, dword [edi + 0x1c]
mov dword [esp + ebx*8 + 0x20], eax
inc ebx
mov eax, dword [esp + 0xc]
mov dword [eax], edi
add eax, 4
mov edi, dword [edi]
mov dword [esp + 0xc], eax
cmp ebx, 0x20
jae 0x10004b0b
test edi, edi
jne 0x10004ad6
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x1c]
mov dword [eax], edi
test edi, edi
jne 0x10004b1c
mov dword [esi + 0x24], eax
push 0
mov byte [esi + 0xf], bl
lea eax, [esp + 0x24]
mov edi, dword [esi + 0x1d4]
xorps xmm0, xmm0
push edi
push 0
push 0
movups xmmword [edi], xmm0
push ebx
mov dword [edi + 0x10], 0
push eax
mov byte [edi + 0x24], 1
mov dword [edi + 0x14], esi
push dword [esi + 0x18]
call dword [sym.imp.WS2_32.dll_WSASend]
test eax, eax
je 0x10004ba6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x10004ba6
push eax
push str.TcpSocketWin32:_WSASend_failed_0x_X
call fcn.10056110
add esp, 8
push edi
push 0x10115c70
call dword [sym.imp.KERNEL32.dll_InterlockedPushEntrySList]
mov eax, dword [esi + 0x18]
cmp eax, 0xffffffff
je 0x10004b89
push eax
call dword [sym.imp.KERNEL32.dll_CancelIo]
mov byte [esi + 0xe], 1
mov byte [esi + 0x11], 0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.100908e7
mov esp, ebp
pop ebp
ret
mov byte [esi + 0xd], 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.100908e7
mov esp, ebp
pop ebp
ret
cmp al, 4
jne 0x10004bdd
call fcn.10004750
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.100908e7
mov esp, ebp
pop ebp
ret
cmp al, 1
jne 0x10004bf5
movzx ecx, byte [esi + 0xd]
movzx eax, byte [esi + 0xc]
add ecx, eax
jne 0x10004bf5
push ecx
mov ecx, esi
call fcn.10004c10
mov ecx, dword [esp + 0x124]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100908e7
mov esp, ebp
pop ebp
ret