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

Disassembly:
sub esp, 0x10
push ebx
push ebp
mov bp, word [esp + 0x1c]
push esi
push edi
mov ebx, 1
xor edi, edi
mov eax, dword [0x42f8dc]
dec eax
cmp eax, 7
ja case.default.0x40a512
jmp dword [eax*4 + 0x40aa88]
cmp bp, bx
jne 0x40a575
cmp dword [0x42f8e0], edi
jne case.default.0x40a512
mov edx, dword [0x42f8d8]
push edi
lea ecx, [esp + 0x28]
push 4
push ecx
push edx
call sub.WSOCK32.dll_recv
test eax, eax
jle case.default.0x40a512
mov eax, dword [esp + 0x24]
push eax
call sub.WSOCK32.dll_ntohl
push eax
mov dword [0x42f8e0], eax
mov dword [0x42f8e8], edi
call fcn.00414c90
add esp, 4
mov dword [0x42f8ec], eax
mov dword [0x42f8dc], 2
jmp 0x40a503
cmp bp, 2
jne case.default.0x40a512
mov eax, dword [0x42f8e0]
cmp eax, edi
jne 0x40a59a
call fcn.00402f90
mov eax, dword [0x42f8e0]
cmp eax, edi
je case.default.0x40a512
push eax
call sub.WSOCK32.dll_htonl
mov edx, dword [0x42f8d8]
push edi
lea ecx, [esp + 0x14]
push 4
push ecx
push edx
mov dword [esp + 0x20], eax
call sub.WSOCK32.dll_send
test eax, eax
jle case.default.0x40a512
mov dword [0x42f8dc], 3
jmp 0x40a503
mov eax, dword [0x42f8e0]
mov ecx, dword [0x42f8e8]
sub eax, ecx
push edi
push eax
mov eax, dword [0x42f8ec]
add eax, ecx
mov ecx, dword [0x42f8d8]
push eax
push ecx
call sub.WSOCK32.dll_recv
cmp eax, edi
jle case.default.0x40a512
mov ecx, dword [0x42f8e8]
add ecx, eax
mov eax, dword [0x42f8e0]
cmp ecx, eax
mov dword [0x42f8e8], ecx
jne case.default.0x40a512
mov esi, dword [0x42f8ec]
mov dword [0x42f8e0], edi
push esi
push eax
mov dword [0x42f8e8], edi
mov dword [0x42f8ec], edi
mov dword [0x42f8dc], ebx
call fcn.00402ce0
push esi
call fcn.00414ba7
add esp, 0xc
jmp 0x40a503
mov eax, dword [0x42f8e0]
mov ecx, dword [0x42f8e8]
mov edx, dword [0x42f8ec]
sub eax, ecx
push edi
push eax
mov eax, dword [0x42f8d8]
add edx, ecx
push edx
push eax
call sub.WSOCK32.dll_send
cmp eax, edi
jle case.default.0x40a512
mov ecx, dword [0x42f8e8]
add ecx, eax
mov eax, dword [0x42f8e0]
cmp ecx, eax
mov dword [0x42f8e8], ecx
jne case.default.0x40a512
mov ecx, dword [0x42f8ec]
mov dword [0x42f8e0], edi
push ecx
mov dword [0x42f8e8], edi
call fcn.00414ba7
add esp, 4
mov dword [0x42f8ec], edi
mov dword [0x42f8dc], ebx
jmp 0x40a503
cmp bp, 2
jne case.default.0x40a512
mov eax, dword [0x42f918]
cmp eax, edi
je case.default.0x40a512
push eax
call sub.WSOCK32.dll_htonl
mov dword [esp + 0x14], eax
mov eax, dword [0x42f8d8]
push edi
lea edx, [esp + 0x18]
push 4
push edx
push eax
call sub.WSOCK32.dll_send
test eax, eax
jle case.default.0x40a512
mov ecx, dword [0x42f918]
mov edx, dword [0x42f8ec]
mov eax, dword [0x42f8d8]
push edi
push ecx
push edx
push eax
call sub.WSOCK32.dll_send
test eax, eax
jle case.default.0x40a512
mov dword [0x42f918], edi
mov dword [0x42f8dc], 5
jmp 0x40a503
cmp bp, 2
jne case.default.0x40a512
mov eax, dword [0x42f918]
cmp eax, edi
jne 0x40a770
mov ecx, dword [0x42f908]
mov edx, dword [0x42f8e0]
mov eax, dword [0x42f8ec]
push ecx
push edx
push ebx
push eax
call fcn.00415a55
add esp, 0x10
cmp eax, edi
je 0x40aa07
mov dword [0x42f918], eax
mov dword [0x42f8e4], edi
mov ecx, dword [0x42f8ec]
mov edx, dword [0x42f8e4]
push edi
push eax
mov eax, dword [0x42f8d8]
add edx, ecx
push edx
push eax
call sub.WSOCK32.dll_send
cmp eax, edi
jle case.default.0x40a512
mov edx, dword [0x42f8e8]
mov ecx, dword [0x42f918]
add edx, eax
cmp eax, ecx
mov dword [0x42f8e8], edx
jge 0x40a7c6
mov edx, ecx
mov ecx, dword [0x42f8e4]
sub edx, eax
add ecx, eax
mov dword [0x42f918], edx
mov dword [0x42f8e4], ecx
jmp 0x40a7d2
mov dword [0x42f918], edi
mov dword [0x42f8e4], edi
mov ecx, dword [0x42f8e8]
mov eax, dword [0x42f91c]
cmp ecx, eax
jl 0x40a503
mov edx, dword [0x42f908]
push edx
call fcn.00414342
mov eax, dword [0x42f8ec]
mov dword [0x42f908], edi
push eax
call fcn.00414ba7
mov ecx, dword [0x42f90c]
mov dword [0x42f8ec], edi
push ecx
mov dword [0x42f8e0], edi
mov dword [0x42f8e8], edi
mov dword [0x42f918], edi
mov dword [0x42f91c], edi
call fcn.00414ba7
mov edx, dword [0x42f910]
mov dword [0x42f90c], edi
push edx
call fcn.00414ba7
add esp, 0x10
mov dword [0x42f910], edi
mov dword [0x42f8dc], ebx
jmp 0x40a503
cmp bp, 2
jne case.default.0x40a512
mov eax, dword [0x42f918]
cmp eax, edi
je case.default.0x40a512
push eax
call sub.WSOCK32.dll_htonl
mov ecx, dword [0x42f8d8]
mov dword [esp + 0x18], eax
push edi
lea eax, [esp + 0x1c]
push 4
push eax
push ecx
call sub.WSOCK32.dll_send
test eax, eax
jle case.default.0x40a512
mov edx, dword [0x42f918]
mov eax, dword [0x42f8ec]
mov ecx, dword [0x42f8d8]
push edi
push edx
push eax
push ecx
call sub.WSOCK32.dll_send
test eax, eax
jle case.default.0x40a512
mov dword [0x42f918], edi
mov dword [0x42f8dc], 7
jmp 0x40a503
mov eax, dword [0x42f8d8]
push edi
lea edx, [esp + 0x20]
push 4
push edx
push eax
call sub.WSOCK32.dll_recv
test eax, eax
jle case.default.0x40a512
mov ecx, dword [esp + 0x1c]
push ecx
call sub.WSOCK32.dll_ntohl
mov dword [0x42f91c], eax
mov dword [0x42f8e8], edi
mov dword [0x42f8dc], 8
jmp 0x40a503
mov eax, dword [0x42f91c]
mov esi, dword [0x42f8e8]
mov ecx, dword [0x42f8e0]
sub eax, esi
cmp eax, ecx
jle 0x40a91e
mov eax, ecx
cmp eax, edi
je 0x40aa00
mov edx, dword [0x42f8ec]
push edi
push eax
mov eax, dword [0x42f8d8]
push edx
push eax
call sub.WSOCK32.dll_recv
mov esi, eax
cmp esi, edi
jl case.default.0x40a512
je case.default.0x40a512
mov eax, dword [0x42f908]
cmp eax, edi
je 0x40a969
cmp esi, edi
jle 0x40a969
mov ecx, dword [0x42f8ec]
push eax
push esi
push ebx
push ecx
call fcn.0041591c
add esp, 0x10
mov eax, dword [0x42f8e8]
mov ecx, dword [0x42f91c]
add eax, esi
cmp eax, ecx
mov dword [0x42f8e8], eax
jl 0x40a503
mov eax, dword [0x42f908]
mov dword [0x42f8dc], ebx
cmp eax, edi
je 0x40a99b
push eax
call fcn.00414342
add esp, 4
mov eax, dword [0x42f8ec]
mov dword [0x42f908], edi
cmp eax, edi
mov dword [0x42f91c], edi
mov dword [0x42f8e0], edi
mov dword [0x42f8e8], edi
je 0x40a9c5
push eax
call fcn.00414ba7
add esp, 4
mov eax, dword [0x42f90c]
mov dword [0x42f8ec], edi
cmp eax, edi
je 0x40a9dd
push eax
call fcn.00414ba7
add esp, 4
mov eax, dword [0x42f910]
mov dword [0x42f90c], edi
cmp eax, edi
je 0x40a9f5
push eax
call fcn.00414ba7
add esp, 4
mov dword [0x42f910], edi
jmp 0x40a503
xor esi, esi
jmp 0x40a94a
push str.ZERO_SIZE
call fcn.00402cc0
mov edx, dword [0x42f908]
push edx
call fcn.00414342
mov eax, dword [0x42f8ec]
mov dword [0x42f908], edi
push eax
call fcn.00414ba7
mov ecx, dword [0x42f90c]
mov dword [0x42f8ec], edi
push ecx
mov dword [0x42f8e0], edi
mov dword [0x42f8e8], edi
mov dword [0x42f918], edi
mov dword [0x42f91c], edi
call fcn.00414ba7
mov edx, dword [0x42f910]
mov dword [0x42f90c], edi
push edx
call fcn.00414ba7
add esp, 0x14
mov dword [0x42f910], edi
mov dword [0x42f8dc], ebx
call fcn.0040a1b0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret