Function at 0x1004a170
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov ebp, ecx
mov ecx, dword [esp + 0x38]
mov dword [esp], edx
xor edx, edx
cmp dword [ecx + 8], 1
jne 0x1004a190
mov eax, dword [ecx + 0xc]
mov edx, dword [eax]
and edx, 0xf
mov ebx, dword [esp + 0x34]
and edx, 0xfffffffd
call fcn.10049b60
mov eax, dword [ebp]
lea edi, [eax + 0x70]
mov dword [esp + 4], eax
nop word cs:[eax + eax]
mov eax, dword [0x10551ebc]
mov ecx, dword [esp]
mov edx, dword [ecx + 8]
cmp eax, 5
jb 0x1004a1cd
cmp edx, ebx
jb 0x1004a62f
mov eax, dword [0x10551ec0]
mov esi, edx
sub esi, ebx
jb 0x1004a626
mov eax, dword [esp]
mov dword [esp + 8], esi
mov dword [esp + 0x18], 0
mov eax, dword [eax]
mov dword [esp + 0x1c], eax
lea eax, [eax + ebx]
mov dword [esp + 0xc], eax
push 0
push edi
push 0
lea eax, [esp + 0x24]
push eax
push 1
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
push dword [eax + 0x88]
call sub.WS2_32.dll_WSASend
cmp eax, 0xffffffff
je 0x1004a230
mov ebp, dword [esp + 0x18]
mov ecx, 1
jmp 0x1004a245
call sub.WS2_32.dll_WSAGetLastError
xor ecx, ecx
cmp eax, 0x3e5
cmovne ebp, eax
jne 0x1004a30c
cmp ecx, 1
jne 0x1004a26e
mov eax, dword [esp + 0x38]
cmp byte [eax + 0x4c], 0
je 0x1004a26e
mov eax, dword [0x10551ebc]
cmp eax, 5
jb 0x1004a263
mov eax, dword [0x10551ec0]
cmp esi, ebp
je 0x1004a2c0
add ebx, ebp
jmp 0x1004a1b0
mov eax, dword [0x10551ebc]
cmp eax, 5
jb 0x1004a27d
mov eax, dword [0x10551ec0]
mov ecx, dword [esp]
mov edi, dword [esp + 0x38]
mov eax, dword [ecx + 8]
movsd xmm0, qword [ecx]
mov dword [esp + 0x10], eax
movsd qword [esp + 8], xmm0
mov eax, dword [edi + 0x38]
test eax, eax
je 0x1004a415
cmp eax, 2
je 0x1004a2ae
cmp eax, 1
jne 0x1004a34a
cmp dword [edi + 0x40], 0
je 0x1004a415
mov esi, dword [edi + 0x3c]
jmp 0x1004a407
mov edi, dword [esp + 0x38]
mov edx, 2
cmp dword [edi + 8], 1
jne 0x1004a2da
mov eax, dword [edi + 0xc]
mov edx, dword [eax]
and edx, 0xd
or edx, 2
mov ecx, edi
call fcn.10049b60
mov eax, dword [edi + 0x38]
test eax, eax
je 0x1004a45f
cmp eax, 2
je 0x1004a2fa
cmp eax, 1
jne 0x1004a37e
cmp dword [edi + 0x40], 0
je 0x1004a45f
mov esi, dword [edi + 0x3c]
jmp 0x1004a451
mov eax, dword [0x10551ebc]
cmp eax, 5
jb 0x1004a31b
mov eax, dword [0x10551ec0]
mov edi, dword [esp + 0x38]
mov eax, dword [edi + 0x38]
test eax, eax
je 0x1004a4bf
cmp eax, 2
je 0x1004a338
cmp eax, 1
jne 0x1004a3b9
cmp dword [edi + 0x40], 0
je 0x1004a4bf
mov esi, dword [edi + 0x3c]
jmp 0x1004a4b1
cmp byte [edi + 0x3c], 2
jb 0x1004a415
mov esi, dword [edi + 0x40]
mov eax, dword [esi + 4]
push dword [esi]
call dword [eax]
add esp, 4
mov eax, dword [esi + 4]
cmp dword [eax + 4], 0
je 0x1004a404
mov esi, dword [esi]
cmp dword [eax + 8], 9
jae 0x1004a3f4
call sub.KERNEL32.dll_GetProcessHeap
push esi
jmp 0x1004a3fc
cmp byte [edi + 0x3c], 2
jb 0x1004a45f
mov esi, dword [edi + 0x40]
mov eax, dword [esi + 4]
push dword [esi]
call dword [eax]
add esp, 4
mov eax, dword [esi + 4]
cmp dword [eax + 4], 0
je 0x1004a44e
mov esi, dword [esi]
cmp dword [eax + 8], 9
jae 0x1004a43e
call sub.KERNEL32.dll_GetProcessHeap
push esi
jmp 0x1004a446
cmp byte [edi + 0x3c], 2
jb 0x1004a4bf
mov esi, dword [edi + 0x40]
mov eax, dword [esi + 4]
push dword [esi]
call dword [eax]
add esp, 4
mov eax, dword [esi + 4]
cmp dword [eax + 4], 0
je 0x1004a4ae
mov esi, dword [esi]
cmp dword [eax + 8], 9
jae 0x1004a49e
call sub.KERNEL32.dll_GetProcessHeap
push esi
jmp 0x1004a4a6
call sub.KERNEL32.dll_GetProcessHeap
push dword [esi - 4]
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov esi, dword [edi + 0x40]
call sub.KERNEL32.dll_GetProcessHeap
push esi
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov dword [edi + 0x38], 1
mov ecx, dword [esp + 4]
movsd xmm0, qword [esp + 8]
movsd qword [edi + 0x3c], xmm0
mov eax, dword [esp + 0x10]
mov dword [edi + 0x44], eax
mov dword [edi + 0x48], ebx
lock inc dword [ecx + 0x8c]
jmp 0x1004a496
call sub.KERNEL32.dll_GetProcessHeap
push dword [esi - 4]
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov esi, dword [edi + 0x40]
call sub.KERNEL32.dll_GetProcessHeap
push esi
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov dword [edi + 0x38], 0
mov eax, dword [esp]
movsd xmm0, qword [esp + 8]
movsd xmm1, qword [esp + 0x10]
movsd qword [edi + 0x3c], xmm0
movsd qword [edi + 0x44], xmm1
cmp dword [eax + 4], 0
je 0x1004a496
call sub.KERNEL32.dll_GetProcessHeap
push dword [esp + 0x1c]
push 0
push eax
call sub.KERNEL32.dll_HeapFree
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
call sub.KERNEL32.dll_GetProcessHeap
push dword [esi - 4]
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov esi, dword [edi + 0x40]
call sub.KERNEL32.dll_GetProcessHeap
push esi
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov dword [edi + 0x38], 3
mov dword [edi + 0x40], ebp
mov dword [edi + 0x3c], 0
mov edx, 2
cmp dword [edi + 8], 1
jne 0x1004a4e6
mov eax, dword [edi + 0xc]
mov edx, dword [eax]
and edx, 0xd
or edx, 2
mov ecx, edi
call fcn.10049b60
mov eax, dword [esp]
mov ecx, edi
mov edi, dword [eax]
mov ebp, dword [eax + 4]
mov eax, dword [ecx + 4]
cmp eax, 2
jne 0x1004a54c
mov esi, dword [ecx]
test esi, esi
je 0x1004a54c
mov ecx, dword [esi + 0x10]
call fcn.100f4af0
mov eax, dword [0x10551f14]
test eax, eax
jne 0x1004a5fd
xor ebx, ebx
mov al, byte [esi + 0x14]
lea edx, [esi + 0x10]
test al, al
jne 0x1004a640
mov eax, dword [esi + 0x20]
cmp eax, dword [esi + 0x1c]
jae 0x1004a55f
mov ecx, dword [esi + 0x18]
lea eax, [eax + eax*2]
mov dword [ecx + eax*4], edi
mov dword [ecx + eax*4 + 4], ebp
mov dword [ecx + eax*4 + 8], 0
inc dword [esi + 0x20]
jmp 0x1004a575
test ebp, ebp
je 0x1004a496
call sub.KERNEL32.dll_GetProcessHeap
push edi
jmp 0x1004a48e
test ebp, ebp
je 0x1004a575
mov ebp, edx
call sub.KERNEL32.dll_GetProcessHeap
push edi
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov edx, ebp
test bl, bl
jne 0x1004a586
mov eax, dword [0x10551f14]
test eax, eax
jne 0x1004a60c
mov esi, dword [edx]
mov eax, dword [0x10551f24]
test eax, eax
je 0x1004a5a9
cmp eax, 0x100f3390
jne 0x1004a5ce
mov eax, dword [esi]
mov byte [eax + 0x18], 0
push eax
call sub.KERNEL32.dll_LeaveCriticalSection
jmp 0x1004a496
mov ecx, 0x103a03b9
mov edx, 0x17
call fcn.100f2fc0
test eax, eax
mov eax, 0x100f3390
cmovne eax, edx
mov dword [0x10551f24], eax
cmp eax, 0x100f3390
je 0x1004a598
mov eax, dword [0x10551f3c]
test eax, eax
jne 0x1004a5f5
mov ecx, str.ReleaseSRWLockExclusive
mov edx, 0x17
call fcn.100f2fc0
test eax, eax
mov eax, 0x100f51d0
cmovne eax, edx
mov dword [0x10551f3c], eax
push esi
call eax
jmp 0x1004a496
call fcn.100faaa0
mov ebx, eax
xor bl, 1
jmp 0x1004a51c
mov edi, edx
call fcn.100faaa0
mov edx, edi
test al, al
jne 0x1004a586
mov byte [esi + 0x14], 1
jmp 0x1004a586
mov ecx, ebx
push 0x103975ec
jmp 0x1004a636
mov ecx, ebx
push 0x103975dc
call fcn.10009b70
add esp, 4
ud2
mov dword [esp + 8], edx
mov byte [esp + 0xc], bl
mov ecx, 0x103c93eb
mov edx, 0x2b
push 0x103975ac
push 0x1039759c
lea eax, [esp + 0x10]
push eax
call fcn.1000aa20
add esp, 0xc
ud2