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

Disassembly:
sub esp, 0x830
mov eax, dword [0x6d63d0]
push ebx
push ebp
mov dword [esp + 0x834], eax
mov eax, dword [esp + 0x83c]
mov ecx, dword [eax + 0x84]
mov eax, dword [0x76ef98]
push esi
push edi
mov edi, 5
xor ebp, ebp
test eax, eax
mov byte [esp + 0x38], 3
mov dword [esp + 0x39], ecx
mov dword [esp + 0x838], edi
jle 0x646857
mov ebx, 0x76ee80
lea esp, [esp]
push ebp
lea edx, [esp + 0x28]
push str.localip_d
push edx
call fcn.00671a9a
lea eax, [esp + 0x30]
add esp, 0xc
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x646790
sub eax, edx
mov edx, dword [esp + 0x838]
mov ecx, 0x800
inc eax
sub ecx, edx
cmp eax, ecx
jle 0x6467ae
mov eax, ecx
test eax, eax
je 0x6467df
mov ecx, eax
lea edi, [esp + edx + 0x38]
mov edx, ecx
shr ecx, 2
lea esi, [esp + 0x24]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x838]
add ecx, eax
mov dword [esp + 0x838], ecx
mov byte [esp + ecx + 0x37], 0
mov eax, dword [ebx]
push eax
call sub.WSOCK32.dll_inet_ntoa
mov ecx, eax
lea edi, [ecx + 1]
lea esp, [esp]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x6467f0
sub ecx, edi
mov edi, dword [esp + 0x838]
lea edx, [ecx + 1]
mov ecx, 0x800
sub ecx, edi
cmp edx, ecx
jle 0x646810
mov edx, ecx
test edx, edx
je 0x646846
mov esi, eax
mov ecx, edx
mov eax, ecx
shr ecx, 2
lea edi, [esp + edi + 0x38]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x838]
add eax, edx
mov dword [esp + 0x838], eax
mov byte [esp + eax + 0x37], 0
mov edi, dword [esp + 0x838]
mov eax, dword [0x76ef98]
inc ebp
add ebx, 4
cmp ebp, eax
jl 0x646770
mov ecx, 0x800
mov eax, 0xa
sub ecx, edi
cmp ecx, eax
jge 0x64686d
mov eax, ecx
test eax, eax
je 0x64689b
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea edi, [esp + edi + 0x38]
mov esi, str.localport
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x838]
add ecx, eax
mov dword [esp + 0x838], ecx
mov byte [esp + ecx + 0x37], 0
mov eax, dword [esp + 0x844]
mov ecx, dword [eax + 0xc0]
push ecx
lea edx, [esp + 0x14]
push 0x694d10
push edx
call fcn.00671a9a
lea eax, [esp + 0x1c]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x6468c2
sub eax, edx
lea edx, [eax + 1]
mov eax, dword [esp + 0x838]
mov ecx, 0x800
sub ecx, eax
cmp edx, ecx
jle 0x6468e2
mov edx, ecx
test edx, edx
je 0x64691a
lea edi, [esp + eax + 0x38]
mov ecx, edx
mov eax, ecx
shr ecx, 2
lea esi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x838]
add eax, edx
mov dword [esp + 0x838], eax
mov byte [esp + eax + 0x37], 0
mov eax, dword [esp + 0x838]
mov ecx, 0x800
mov edx, 7
sub ecx, eax
cmp ecx, edx
jge 0x646930
mov edx, ecx
test edx, edx
je 0x646965
lea edi, [esp + eax + 0x38]
mov ecx, edx
mov eax, ecx
shr ecx, 2
mov esi, str.natneg
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x838]
add eax, edx
mov dword [esp + 0x838], eax
mov byte [esp + eax + 0x37], 0
mov eax, dword [esp + 0x838]
mov ecx, dword [esp + 0x844]
mov edx, dword [ecx + 0xc8]
test edx, edx
mov esi, 0x68fd90
jne 0x646980
mov esi, 0x695a28
mov ecx, esi
lea edi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x646985
sub ecx, edi
lea edx, [ecx + 1]
mov ecx, 0x800
sub ecx, eax
cmp edx, ecx
jle 0x64699e
mov edx, ecx
test edx, edx
je 0x6469d2
lea edi, [esp + eax + 0x38]
mov ecx, edx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x838]
add eax, edx
mov dword [esp + 0x838], eax
mov byte [esp + eax + 0x37], 0
mov eax, dword [esp + 0x838]
mov ebp, dword [esp + 0x848]
test ebp, ebp
je 0x646a98
mov ecx, 0x800
mov edx, 0xd
sub ecx, eax
cmp ecx, edx
jge 0x6469f7
mov edx, ecx
test edx, edx
je 0x646a25
lea edi, [esp + eax + 0x38]
mov ecx, edx
mov eax, ecx
shr ecx, 2
mov esi, str.statechanged
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x838]
add eax, edx
mov dword [esp + 0x838], eax
mov byte [esp + eax + 0x37], 0
push ebp
lea ecx, [esp + 0x14]
push 0x694d10
push ecx
call fcn.00671a9a
lea eax, [esp + 0x1c]
add esp, 0xc
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x646a40
sub eax, edx
lea edx, [eax + 1]
mov eax, dword [esp + 0x838]
mov ecx, 0x800
sub ecx, eax
cmp edx, ecx
jle 0x646a60
mov edx, ecx
test edx, edx
je 0x646a98
lea edi, [esp + eax + 0x38]
mov ecx, edx
mov eax, ecx
shr ecx, 2
lea esi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x838]
add eax, edx
mov dword [esp + 0x838], eax
mov byte [esp + eax + 0x37], 0
mov eax, dword [esp + 0x838]
mov ecx, 0x800
mov edx, 9
sub ecx, eax
cmp ecx, edx
jge 0x646aae
mov edx, ecx
test edx, edx
je 0x646ae3
lea edi, [esp + eax + 0x38]
mov ecx, edx
mov eax, ecx
shr ecx, 2
mov esi, str.gamename
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x838]
add eax, edx
mov dword [esp + 0x838], eax
mov byte [esp + eax + 0x37], 0
mov eax, dword [esp + 0x838]
mov ebx, dword [esp + 0x844]
lea esi, [ebx + 4]
mov ecx, esi
lea edi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x646af2
sub ecx, edi
lea edx, [ecx + 1]
mov ecx, 0x800
sub ecx, eax
cmp edx, ecx
jle 0x646b0b
mov edx, ecx
test edx, edx
je 0x646b3f
lea edi, [esp + eax + 0x38]
mov ecx, edx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x838]
add eax, edx
mov dword [esp + 0x838], eax
mov byte [esp + eax + 0x37], 0
mov eax, dword [esp + 0x838]
mov ecx, dword [ebx + 0xa8]
test ecx, ecx
je 0x646cc8
mov ecx, 0x800
mov edx, 9
sub ecx, eax
cmp ecx, edx
jge 0x646b63
mov edx, ecx
test edx, edx
je 0x646b91
lea edi, [esp + eax + 0x38]
mov ecx, edx
mov eax, ecx
shr ecx, 2
mov esi, str.publicip
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x838]
add eax, edx
mov dword [esp + 0x838], eax
mov byte [esp + eax + 0x37], 0
mov ecx, dword [ebx + 0x10c]
push ecx
lea edx, [esp + 0x14]
push 0x694d10
push edx
call fcn.00671a9a
lea eax, [esp + 0x1c]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x646bb1
sub eax, edx
mov edx, dword [esp + 0x838]
mov ecx, 0x800
inc eax
sub ecx, edx
cmp eax, ecx
jle 0x646bcf
mov eax, ecx
test eax, eax
je 0x646c07
lea edi, [esp + edx + 0x38]
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea esi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x838]
add ecx, eax
mov dword [esp + 0x838], ecx
mov byte [esp + ecx + 0x37], 0
mov edx, dword [esp + 0x838]
mov ecx, 0x800
mov eax, 0xb
sub ecx, edx
cmp ecx, eax
jge 0x646c1d
mov eax, ecx
test eax, eax
je 0x646c4b
mov ecx, eax
lea edi, [esp + edx + 0x38]
mov edx, ecx
shr ecx, 2
mov esi, str.publicport
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x838]
add ecx, eax
mov dword [esp + 0x838], ecx
mov byte [esp + ecx + 0x37], 0
movzx eax, word [ebx + 0x110]
push eax
lea ecx, [esp + 0x14]
push 0x694d10
push ecx
call fcn.00671a9a
lea eax, [esp + 0x1c]
add esp, 0xc
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x646c70
sub eax, edx
lea edx, [eax + 1]
mov eax, dword [esp + 0x838]
mov ecx, 0x800
sub ecx, eax
cmp edx, ecx
jle 0x646c90
mov edx, ecx
test edx, edx
je 0x646cc8
lea edi, [esp + eax + 0x38]
mov ecx, edx
mov eax, ecx
shr ecx, 2
lea esi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x838]
add eax, edx
mov dword [esp + 0x838], eax
mov byte [esp + eax + 0x37], 0
mov eax, dword [esp + 0x838]
cmp ebp, 2
je 0x646d12
push 0
push 0xff
lea ecx, [esp + 0x40]
push 0
push ecx
call fcn.00645740
push 0
push 0xff
lea edx, [esp + 0x50]
push 1
push edx
call fcn.00645740
push 0
push 0xff
lea eax, [esp + 0x60]
push 2
push eax
call fcn.00645740
mov eax, dword [esp + 0x868]
add esp, 0x30
jmp 0x646d32
mov ecx, 0x800
sub ecx, eax
cmp ecx, 1
jl 0x646d32
mov byte [esp + eax + 0x38], 0
mov eax, dword [esp + 0x838]
inc eax
mov dword [esp + 0x838], eax
mov ecx, dword [ebx]
push 0x10
lea edx, [ebx + 0xcc]
push edx
push 0
push eax
lea eax, [esp + 0x48]
push eax
push ecx
call sub.WSOCK32.dll_sendto
call sub.KERNEL32.dll_GetTickCount
test ebp, ebp
mov dword [ebx + 0xac], eax
mov dword [ebx + 0xb0], eax
je 0x646d6a
mov dword [ebx + 0xb4], 0
mov ecx, dword [esp + 0x83c]
pop edi
pop esi
pop ebp
pop ebx
call fcn.00671b23
add esp, 0x830
ret