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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffc10
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
push ebx
call fcn.005035b7
test eax, eax
je 0x504811
cmp dword [ebx + 0x374], 0
je 0x504811
push dword [ebx]
call fcn.00412717
test eax, eax
je 0x504811
mov dword [ebx + 0x33c], 1
xor edx, edx
mov dword [ebx + 0x39c], edx
cmp dword [ebx + 0x374], 1
jne 0x5045eb
mov dword [ebx + 0x374], 2
lea ecx, [ebx + 0x234]
push ecx
push dword [ebx + 0x360]
imul edx, dword [eax + 0xb88], 0x64
add eax, edx
add eax, 0xa5c
push eax
push str.120__s__lu__s_n
lea eax, [ebp - 0x3f0]
push eax
call sub.USER32.dll_wsprintfA
add esp, 0x14
push 0
lea ecx, [ebp - 0x3f0]
push ecx
call fcn.0054e28c
pop ecx
push eax
lea eax, [ebp - 0x3f0]
push eax
push dword [ebx + 0x3c4]
call sub.WSOCK32.dll_send
push 0x21
push 0x8014
push dword [0x56f018]
push dword [ebx + 0x3c4]
call sub.WSOCK32.dll_WSAAsyncSelect
mov eax, 1
jmp 0x504835
mov eax, dword [ebx + 0x374]
cmp eax, 2
je 0x5045ff
cmp eax, 3
jne 0x504811
push 0
push 0
push dword [0x56f018]
push dword [ebx + 0x3c4]
call sub.WSOCK32.dll_WSAAsyncSelect
push 0
push 0x3e6
lea edx, [ebp - 0x3f0]
push edx
push dword [ebx + 0x3c4]
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
je 0x504811
test eax, eax
jle 0x504811
mov byte [ebp + eax - 0x3f0], 0
lea ecx, [ebp - 0x3f0]
push ecx
call fcn.004d46f8
test eax, eax
je 0x504811
lea edi, [ebp - 0x3f0]
jmp 0x504663
inc edi
cmp byte [edi], 0x20
je 0x504662
cmp byte [edi], 0
je 0x504811
push 0x20
push edi
call fcn.0054e1ec
add esp, 8
mov esi, eax
test esi, esi
je 0x504811
mov byte [esi], 0
inc esi
jmp 0x50468d
inc esi
cmp byte [esi], 0x20
je 0x50468c
cmp byte [esi], 0
je 0x504811
push 0x20
push esi
call fcn.0054e1ec
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x5046e4
mov eax, dword [ebp - 4]
mov byte [eax], 0
inc dword [ebp - 4]
jmp 0x5046bd
inc dword [ebp - 4]
mov edx, dword [ebp - 4]
cmp byte [edx], 0x20
je 0x5046ba
mov ecx, dword [ebp - 4]
cmp byte [ecx], 0
je 0x5046e4
push 0xa
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
call fcn.00558628
add esp, 0xc
mov dword [ebx + 0x364], eax
push esi
call fcn.004d473f
test eax, eax
je 0x504811
push edi
call fcn.005570e0
pop ecx
mov dword [ebx + 0x378], eax
cmp dword [ebx + 0x374], 3
jne 0x504777
cmp dword [ebx + 0x378], 0x84
jne 0x504811
lea edx, [ebx + 0x234]
push edx
lea ecx, [ebx + 4]
push ecx
push 0x56da4c
lea eax, [ebp - 0x3f0]
push eax
call sub.USER32.dll_wsprintfA
add esp, 0x10
mov edx, dword [0x56d9d4]
mov dword [0x56f1a4], edx
push dword [ebx + 0x3c8]
push 1
push 1
push 3
lea ecx, [ebp - 0x3f0]
push ecx
call fcn.0052637f
mov esi, eax
mov dword [ebx], esi
test esi, esi
je 0x504811
push ebx
call fcn.00504c63
mov eax, 1
jmp 0x504835
cmp dword [ebx + 0x378], 0x79
jne 0x504811
lea edi, [ebx + 4]
push esi
push edi
mov eax, edi
mov edi, esi
mov esi, eax
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
push dword [ebx]
call fcn.0051fafa
mov esi, eax
test esi, esi
je 0x5047d4
lea eax, [ebx + 0x234]
push eax
push edi
push 0x56da58
lea edx, [esi + 8]
push edx
call sub.USER32.dll_wsprintfA
add esp, 0x10
lea ecx, [ebx + 0x234]
push ecx
push edi
push str.Send__s__s
lea eax, [ebp - 0x3f0]
push eax
call sub.USER32.dll_wsprintfA
add esp, 0x10
lea edx, [ebp - 0x3f0]
push edx
push dword [ebx]
call sub.USER32.dll_SetWindowTextA
push esi
call fcn.004172e2
push ebx
call fcn.00504c63
mov eax, 1
jmp 0x504835
cmp dword [ebx + 0x374], 3
jne 0x504826
push 0
push ebx
call fcn.005034e7
xor eax, eax
jmp 0x504835
push 0x56da70
push 0
push ebx
call fcn.00505655
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4