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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44b498
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
mov ebx, dword [0x4675e0]
mov eax, 4
push esi
push edi
mov edi, dword [sym.imp.WS2_32.dll_recv]
xor esi, esi
mov dword [ebp - 0x18], ecx
push 0
push eax
lea eax, [ebp - 0x14]
add eax, esi
push eax
push ebx
call edi
cmp eax, 0xffffffff
je 0x40f9c5
add esi, eax
mov eax, 4
sub eax, esi
cmp esi, 4
jl 0x40f9a4
jmp 0x40f9cc
mov byte [0x4674dc], 1
mov ebx, dword [0x4675e0]
xor esi, esi
mov eax, 8
nop dword [eax]
push 0
push eax
lea eax, [ebp - 0x28]
add eax, esi
push eax
push ebx
call edi
cmp eax, 0xffffffff
je 0x40fa01
add esi, eax
mov eax, 8
sub eax, esi
cmp esi, 8
jl 0x40f9e0
jmp 0x40fa08
mov byte [0x4674dc], 1
mov ebx, dword [0x4675e0]
xor esi, esi
mov eax, 1
push 0
push eax
lea eax, [ebp - 0xd]
add eax, esi
push eax
push ebx
call edi
cmp eax, 0xffffffff
je 0x40fa36
add esi, eax
mov eax, 1
sub eax, esi
cmp esi, 1
jl 0x40fa15
jmp 0x40fa3d
mov byte [0x4674dc], 1
mov ebx, dword [ebp - 0x14]
cmp ebx, 0x1f40
jle 0x40fa5e
mov eax, 2
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x4675e0]
xor esi, esi
mov dword [ebp - 0x20], ecx
test ebx, ebx
jle 0x40fa9a
mov eax, ebx
nop
push 0
push eax
mov eax, dword [ebp - 0x18]
add eax, esi
push eax
push ecx
call edi
cmp eax, 0xffffffff
je 0x40fa90
mov ecx, dword [ebp - 0x20]
add esi, eax
mov eax, ebx
sub eax, esi
cmp esi, ebx
jl 0x40fa70
jmp 0x40fa97
mov byte [0x4674dc], 1
mov ebx, dword [ebp - 0x14]
mov al, byte [ebp - 0xd]
cmp al, 0x55
jne 0x40fb74
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x24]
push 0x7e0
call fcn.0041f33b
add esp, 4
mov dword [ebp - 0x20], eax
mov dword [eax], esi
lea ecx, [eax + 8]
push ebx
push dword [ebp - 0x18]
mov dword [eax + 4], edi
mov dword [eax + 0x7d8], ebx
call fcn.00402280
add esp, 8
lea eax, [ebp - 0x20]
push eax
push ecx
lea ecx, [ebp - 0x1c]
call fcn.0041adc0
add esp, 8
mov dword [ebp - 4], 0
mov edx, dword [0x4675f4]
cmp edx, dword [0x4675f8]
je 0x40fb2b
lea eax, [ebp - 0x1c]
mov dword [edx], 0
cmp edx, eax
je 0x40fb1b
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
mov dword [edx], eax
mov byte [edx + 4], 1
add dword [0x4675f4], 8
jmp 0x40fb38
mov ecx, dword [ebp - 0x1c]
mov byte [edx + 4], 1
add dword [0x4675f4], 8
jmp 0x40fb38
lea eax, [ebp - 0x1c]
push eax
push edx
call fcn.0041aeb0
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 4], 2
test ecx, ecx
je 0x40fb5b
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
jne 0x40fb5b
mov edx, dword [ecx + 0x78]
test edx, edx
je 0x40fb6e
mov eax, dword [edx]
push ecx
mov ecx, edx
call dword [eax]
mov ecx, dword [ebp - 0xc]
xor eax, eax
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ecx]
push 1
jmp 0x40fb59
cmp al, 0x70
jne 0x40fb5b
mov eax, dword [ebp - 0x24]
mov edi, dword [ebp - 0x28]
push 0x4675fc
mov dword [ebp - 0x20], eax
call fcn.0041e80c
add esp, 4
test eax, eax
jne 0x40fbef
mov ecx, dword [0x4675e8]
mov esi, dword [ecx]
cmp esi, ecx
je 0x40fbd4
mov edx, dword [ebp - 0x20]
mov eax, dword [esi + 8]
cmp dword [eax], edi
jne 0x40fbad
cmp dword [eax + 4], edx
je 0x40fbb5
mov esi, dword [esi]
cmp esi, ecx
jne 0x40fba1
jmp 0x40fbd4
push 0
push ebx
push dword [ebp - 0x18]
push dword [eax + 8]
call dword [sym.imp.WS2_32.dll_send]
test ebx, ebx
jne 0x40fbd4
mov eax, dword [esi + 8]
push dword [eax + 8]
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x4675fc
call fcn.0041e831
add esp, 4
test eax, eax
je 0x40fb5b
push eax
call fcn.0041e3ca
push eax
call fcn.0041e3ca
int3