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

Disassembly:
sub esp, 0x98
push ebx
push ebp
mov ebp, ecx
mov eax, dword [ebp + 0x17c]
dec eax
cmp eax, 3
push esi
push edi
ja case.default.0x48049c
jmp dword [eax*4 + 0x480a24]
mov eax, dword [esp + 0xac]
dec eax
jne case.default.0x48049c
mov ecx, dword [ebp + 0x1e4]
push 0x10
lea eax, [ebp + 0x24c]
push eax
mov eax, dword [ebp + 0x178]
push 0
push ecx
lea edx, [ebp + 0x180]
push edx
push eax
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
je 0x480800
push str._enter_S_WAIT_RAWINFO__n
mov dword [ebp + 0x17c], 2
call fcn.0047d750
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x98
ret 4
mov eax, dword [esp + 0xac]
sub eax, 0
je 0x48059e
sub eax, 2
jne case.default.0x48049c
mov ecx, dword [ebp + 0x264]
inc ecx
mov eax, ecx
cmp eax, 0xa
mov dword [ebp + 0x264], ecx
jbe case.default.0x48049c
mov edx, dword [ebp + 0x1e4]
push 0x10
lea ecx, [ebp + 0x24c]
push ecx
mov ecx, dword [ebp + 0x178]
push 0
push edx
lea eax, [ebp + 0x180]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
jne 0x480575
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x480810
push str._send_request_at_S_WAIT_RAWINFO__n
mov dword [ebp + 0x264], 0
call fcn.0047d750
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x98
ret 4
lea edx, [esp + 0x18]
push edx
mov edx, dword [ebp + 0x178]
lea eax, [esp + 0x34]
push eax
push 0
push 0x32
lea ecx, [esp + 0x84]
push ecx
push edx
mov dword [esp + 0x30], 0x10
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0xffffffff
je case.default.0x48049c
push 5
push 0x4ab320
push eax
lea eax, [esp + 0x80]
push eax
lea esi, [ebp + 0x1e8]
lea ecx, [ebp + 4]
push esi
call fcn.00481210
test eax, eax
je case.default.0x48049c
mov edi, dword [sym.imp.MSVCR71.dll_strstr]
push str.IDENTITY
push esi
mov byte [eax + ebp + 0x1e8], 0
call edi
add esp, 8
test eax, eax
je case.default.0x48049c
lea esi, [ebp + 0x1f0]
push str.IDENTITY
push esi
call edi
add esp, 8
test eax, eax
je case.default.0x48049c
mov ebx, dword [sym.imp.MSVCR71.dll_sscanf]
lea ecx, [esp + 0x14]
push ecx
push 0x4a7500
push esi
call ebx
mov eax, dword [esp + 0x20]
add esp, 0xc
cmp eax, 8
ja case.default.0x48049c
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea esi, [ebp + 0x1f2]
lea edi, [esp + 0x1c]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
lea edx, [eax + ebp + 0x1f2]
push 0x4a7500
push edx
call ebx
mov eax, dword [esp + 0x1c]
add esp, 0xc
cmp eax, 0xa
ja case.default.0x48049c
mov edx, dword [esp + 0x14]
mov ecx, eax
mov ebx, ecx
shr ecx, 2
lea esi, [edx + ebp + 0x1f4]
lea edi, [esp + 0x24]
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x20]
push ecx
push eax
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x50]
push eax
lea ecx, [ebp + 4]
call fcn.00481150
mov ebx, eax
test ebx, ebx
je case.default.0x48049c
mov ecx, dword [ebp + 0x260]
mov edx, dword [ebp + 0x25c]
push str.REQUEST
push ebx
push ecx
push edx
push 2
push str.REQUEST
lea eax, [esp + 0x8c]
push str._s_1X_08X_08X_02X_s
push eax
call dword [sym.imp.MSVCR71.dll_sprintf]
lea eax, [esp + 0x94]
add esp, 0x20
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x480711
push 5
push 0x4ab320
sub eax, edx
push eax
lea ecx, [esp + 0x80]
push ecx
lea edx, [ebp + 0x180]
push edx
lea ecx, [ebp + 4]
call fcn.00481150
test eax, eax
mov dword [ebp + 0x1e4], eax
je case.default.0x48049c
lea edi, [eax + ebp + 0x180]
mov ecx, ebx
mov eax, ecx
shr ecx, 2
lea esi, [esp + 0x40]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp + 0x1e4]
add edx, ebx
push str._enter_S_WAITING_SEND_IDENTITY_INFO__n
mov dword [ebp + 0x1e4], edx
mov dword [ebp + 0x17c], 3
call fcn.0047d750
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x98
ret 4
mov eax, dword [esp + 0xac]
sub eax, 0
je 0x48081f
dec eax
jne case.default.0x48049c
mov edx, dword [ebp + 0x1e4]
push 0x10
lea ecx, [ebp + 0x24c]
push ecx
mov ecx, dword [ebp + 0x178]
push 0
push edx
lea eax, [ebp + 0x180]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
je 0x480800
push str._enter_S_WAIT_RESULT__n
mov dword [ebp + 0x17c], 4
call fcn.0047d750
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x98
ret 4
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je case.default.0x48049c
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x98
ret 4
lea edx, [esp + 0x10]
push edx
mov edx, dword [ebp + 0x178]
lea eax, [esp + 0x34]
push eax
push 0
push 0x32
lea ecx, [esp + 0x50]
push ecx
push edx
mov dword [esp + 0x28], 0x10
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0xffffffff
je case.default.0x48049c
push 5
push 0x4ab320
push eax
lea eax, [esp + 0x4c]
push eax
lea ecx, [ebp + 0x1e8]
push ecx
lea ecx, [ebp + 4]
call fcn.00481210
test eax, eax
je case.default.0x48049c
pop edi
pop esi
mov byte [eax + ebp + 0x1e8], 0
pop ebp
mov eax, 1
pop ebx
add esp, 0x98
ret 4
mov eax, dword [esp + 0xac]
sub eax, 0
je 0x480912
sub eax, 2
jne case.default.0x48049c
mov ecx, dword [ebp + 0x264]
inc ecx
mov eax, ecx
cmp eax, 0xa
mov dword [ebp + 0x264], ecx
jbe case.default.0x48049c
mov eax, dword [ebp + 0x1e4]
push 0x10
lea edx, [ebp + 0x24c]
push edx
mov edx, dword [ebp + 0x178]
push 0
push eax
lea ecx, [ebp + 0x180]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
jne 0x4808f6
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x480810
pop edi
pop esi
mov dword [ebp + 0x264], 0
pop ebp
mov eax, 1
pop ebx
add esp, 0x98
ret 4
lea eax, [esp + 0x10]
push eax
mov eax, dword [ebp + 0x178]
lea ecx, [esp + 0x34]
push ecx
push 0
push 0x32
lea edx, [esp + 0x50]
push edx
push eax
mov dword [esp + 0x28], 0x10
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0xffffffff
je case.default.0x48049c
push 5
push 0x4ab320
push eax
lea ecx, [esp + 0x4c]
push ecx
lea esi, [ebp + 0x1e8]
push esi
lea ecx, [ebp + 4]
call fcn.00481210
test eax, eax
je case.default.0x48049c
cmp eax, 5
mov byte [eax + ebp + 0x1e8], 0
jne 0x4809b4
push str.READY
push esi
call dword [sym.imp.MSVCR71.dll_strstr]
add esp, 8
test eax, eax
je case.default.0x48049c
push str.obtain_test_channle_resource__n
mov dword [ebp + 0x17c], 6
call fcn.0047d750
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x98
ret 4
cmp eax, 0x16
jne case.default.0x48049c
push str.BUSYNOW
push esi
mov esi, dword [sym.imp.MSVCR71.dll_strstr]
call esi
add esp, 8
test eax, eax
je case.default.0x48049c
lea edi, [ebp + 0x1ef]
push str.BUSYNOW
push edi
call esi
add esp, 8
test eax, eax
je case.default.0x48049c
lea esi, [ebp + 0x268]
push esi
push 0x4ab36c
push edi
call dword [sym.imp.MSVCR71.dll_sscanf]
mov edx, dword [esi]
push edx
push str.busy_wait__dms___n
mov dword [ebp + 0x17c], 5
call fcn.0047d750
add esp, 0x14
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x98
ret 4