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

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x44]
cmp edi, 4
jle 0x49835b
mov ebx, dword [esp + 0x40]
cmp dword [ebx], 0x504d4153
jne 0x49835b
mov eax, dword [0x4f5fb8]
test eax, eax
je 0x49835b
cmp dword [eax + 0x5e], 1
jne 0x49835b
cmp edi, 0xb
jl case.0x497c62.101
mov eax, dword [esp + 0x3c]
push eax
mov word [0x515d08], 2
call dword [sym.imp.WSOCK32.dll_htons]
mov esi, dword [esp + 0x38]
mov word [0x515d0a], ax
mov al, byte [0x4f5fd4]
test al, al
mov dword [0x515d0c], esi
je 0x497c4b
push esi
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
movsx ecx, byte [ebx + 0xa]
push eax
push ecx
push str._query:_c__from__s
call fcn.0048c8d0
add esp, 0xc
movsx eax, byte [ebx + 0xa]
add eax, 0xffffff9d
cmp eax, 0x15
ja case.0x497c62.101
movzx edx, byte [eax + 0x498384]
jmp dword [edx*4 + 0x498368]
push esi
call fcn.00497a70
add esp, 4
test eax, eax
jne case.0x497c62.101
cmp edi, 0xf
jne case.0x497c62.101
push 0x10
push 0x515d08
push eax
mov eax, dword [esp + 0x54]
push edi
push ebx
push eax
call dword [sym.imp.WSOCK32.dll_sendto]
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ecx, dword [0x4f5fbc]
push str.query
call fcn.0048b5f0
test al, al
je case.0x497c62.101
push esi
call fcn.00497a70
add esp, 4
test eax, eax
jne case.0x497c62.101
mov ecx, dword [0x4f5fbc]
push str.hostname
call fcn.0048b4d0
mov dword [esp + 0x1c], eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x497ce5
sub eax, edx
cmp eax, 0x32
mov dword [esp + 0x38], eax
jbe 0x497cff
mov dword [esp + 0x38], 0x32
mov ecx, dword [0x4f5fbc]
push str.gamemodetext
call fcn.0048b4d0
mov ebp, eax
mov dword [esp + 0x20], eax
lea ecx, [ebp + 1]
mov al, byte [ebp]
inc ebp
test al, al
jne 0x497d18
sub ebp, ecx
cmp ebp, 0x1e
jbe 0x497d2c
mov ebp, 0x1e
mov ecx, dword [0x4f5fbc]
push str.language
call fcn.0048b4d0
mov dword [esp + 0x24], eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x497d43
sub eax, edx
cmp eax, 0x1e
mov dword [esp + 0x10], eax
jbe 0x497d5d
mov dword [esp + 0x10], 0x1e
mov ecx, dword [0x4f5fb8]
mov esi, dword [ecx + 8]
test esi, esi
je case.0x497c62.101
mov ecx, esi
call fcn.00466a40
mov ecx, dword [0x4f5fbc]
push str.maxplayers
mov dword [esp + 0x1c], eax
call fcn.0048b5b0
mov ecx, esi
mov edi, eax
call fcn.00466000
mov ecx, dword [0x4f5fbc]
push str.password
sub edi, eax
call fcn.0048b4d0
mov cl, byte [eax]
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x38]
test cl, cl
setne byte [esp + 0x44]
add edx, ebp
lea eax, [edx + esi + 0x1c]
push eax
mov dword [esp + 0x2c], eax
call fcn.00498d94
mov edx, dword [ebx]
mov ecx, eax
mov dword [ecx], edx
mov edx, dword [ebx + 4]
mov dword [ecx + 4], edx
mov dx, word [ebx + 8]
mov word [ecx + 8], dx
mov dl, byte [ebx + 0xa]
mov byte [ecx + 0xa], dl
mov cl, byte [esp + 0x48]
mov byte [eax + 0xb], cl
mov dx, word [esp + 0x1c]
mov dword [esp + 0x18], eax
add eax, 0xb
mov word [eax + 1], dx
add esp, 4
inc eax
mov word [eax + 2], di
add eax, 2
mov dword [eax + 2], esi
mov ecx, esi
mov esi, dword [esp + 0x1c]
mov edx, ecx
shr ecx, 2
add eax, 2
add eax, 4
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x20]
add eax, edx
mov dword [eax], ebp
add eax, 4
mov ecx, ebp
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x24]
mov dword [eax + ebp], ecx
add eax, ebp
lea edi, [eax + 4]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x10
and ecx, 3
push 0x515d08
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x30]
push 0
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x54]
push ecx
push edx
push eax
call dword [sym.imp.WSOCK32.dll_sendto]
mov ecx, dword [esp + 0x14]
push ecx
call fcn.00498da6
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ecx, dword [0x4f5fbc]
push str.query
call fcn.0048b5f0
test al, al
je case.0x497c62.101
push esi
call fcn.00497a70
add esp, 4
test eax, eax
jne case.0x497c62.101
mov edx, dword [0x4f5fb8]
mov ecx, dword [edx + 8]
test ecx, ecx
mov dword [esp + 0x44], ecx
je case.0x497c62.101
call fcn.00466a40
mov esi, eax
cmp si, 0x64
ja case.0x497c62.101
movzx eax, si
imul eax, eax, 0x1d
add eax, 0xd
push eax
call fcn.00498d94
mov edx, dword [ebx]
mov ebp, eax
mov ecx, ebp
mov dword [ecx], edx
mov eax, dword [ebx + 4]
mov dword [ecx + 4], eax
mov dx, word [ebx + 8]
mov word [ecx + 8], dx
mov al, byte [ebx + 0xa]
mov edi, ebp
add ebp, 0xb
mov byte [ecx + 0xa], al
mov word [ebp], si
mov esi, dword [esp + 0x48]
add esp, 4
add ebp, 2
mov dword [esp + 0x38], edi
xor ebx, ebx
push ebx
mov ecx, esi
call fcn.00463da0
test eax, eax
je 0x497f9c
movzx ecx, bx
mov eax, dword [esi + ecx*4 + 0x2da84]
test eax, eax
jne 0x497f9c
push ebx
mov ecx, esi
call fcn.00466040
test al, al
je 0x497f9c
push ebx
mov ecx, esi
call fcn.00465c20
mov esi, eax
mov ecx, esi
lea edx, [ecx + 1]
jmp 0x497f60
mov al, byte [ecx]
inc ecx
test al, al
jne 0x497f60
sub ecx, edx
movzx edx, cl
mov byte [ebp], cl
mov ecx, edx
mov eax, ecx
shr ecx, 2
inc ebp
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x44]
push ebx
add ebp, edx
call fcn.0046f9f0
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x38]
mov dword [ebp], eax
add ebp, 4
inc ebx
cmp ebx, 0x3e8
jl 0x497f26
jmp 0x498102
mov ecx, dword [0x4f5fbc]
push str.query
call fcn.0048b5f0
test al, al
je case.0x497c62.101
push esi
call fcn.00497a70
add esp, 4
test eax, eax
jne case.0x497c62.101
mov edx, dword [0x4f5fb8]
mov ecx, dword [edx + 8]
test ecx, ecx
mov dword [esp + 0x44], ecx
je case.0x497c62.101
call fcn.00466a40
mov esi, eax
cmp si, 0x64
ja case.0x497c62.101
movzx eax, si
imul eax, eax, 0x22
add eax, 0xd
push eax
call fcn.00498d94
mov edx, dword [ebx]
mov ebp, eax
mov ecx, ebp
mov dword [ecx], edx
mov eax, dword [ebx + 4]
mov dword [ecx + 4], eax
mov dx, word [ebx + 8]
mov word [ecx + 8], dx
mov al, byte [ebx + 0xa]
mov edi, ebp
add ebp, 0xb
mov byte [ecx + 0xa], al
mov word [ebp], si
mov esi, dword [esp + 0x48]
add esp, 4
add ebp, 2
mov dword [esp + 0x38], edi
xor ebx, ebx
lea ecx, [ecx]
push ebx
mov ecx, esi
call fcn.00463da0
test eax, eax
je 0x4980f5
movzx ecx, bx
mov eax, dword [esi + ecx*4 + 0x2da84]
test eax, eax
jne 0x4980f5
push ebx
mov ecx, esi
call fcn.00466040
test al, al
je 0x4980f5
mov byte [ebp], bl
push ebx
mov ecx, esi
inc ebp
call fcn.00465c20
mov esi, eax
mov ecx, esi
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x498085
sub ecx, edi
movzx edx, cl
mov byte [ebp], cl
mov ecx, edx
mov eax, ecx
shr ecx, 2
inc ebp
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x44]
push ebx
add ebp, edx
call fcn.0046f9f0
mov dword [ebp], eax
mov ecx, dword [0x515d04]
mov esi, dword [ecx]
push ebx
lea edx, [esp + 0x32]
push edx
add ebp, 4
call dword [esi + 0xe8]
mov edx, dword [eax]
mov ax, word [eax + 4]
sub esp, 8
mov ecx, esp
mov dword [ecx], edx
mov word [ecx + 4], ax
mov ecx, dword [0x515d04]
call dword [esi + 0x4c]
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x38]
mov dword [ebp], eax
add ebp, 4
inc ebx
cmp ebx, 0x3e8
jl 0x498040
mov ecx, dword [esp + 0x48]
push 0x10
push 0x515d08
push 0
sub ebp, edi
push ebp
push edi
push ecx
call dword [sym.imp.WSOCK32.dll_sendto]
push edi
call fcn.00498da6
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ecx, dword [0x4f5fbc]
push str.query
call fcn.0048b5f0
test al, al
je case.0x497c62.101
push esi
call fcn.00497a70
add esp, 4
test eax, eax
jne case.0x497c62.101
mov edx, dword [esp + 0x48]
mov ecx, dword [0x4f5fbc]
push 0x10
push 0x515d08
push ebx
push edx
call fcn.0048b0a0
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ecx, dword [0x4f5fbc]
push str.query
call fcn.0048b5f0
test al, al
je case.0x497c62.101
mov ecx, dword [0x4f5fbc]
push str.rcon
call fcn.0048b5f0
test al, al
je case.0x497c62.101
push esi
call fcn.00497a70
add esp, 4
test eax, eax
jne case.0x497c62.101
mov eax, dword [esp + 0x48]
mov dword [0x515d1c], ebx
add ebx, 0xb
cmp edi, 0xd
mov dword [0x4e5974], eax
mov dword [0x515d20], 0xb
jl 0x498338
mov ax, word [ebx]
mov ecx, dword [esp + 0x44]
movzx ebp, ax
lea eax, [ebp + 0xd]
add ebx, 2
cmp ecx, eax
mov dword [esp + 0x28], eax
jl 0x498338
lea ecx, [ebp + 1]
push ecx
call fcn.00498d94
mov ecx, ebp
mov edx, ecx
shr ecx, 2
mov esi, ebx
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add esp, 4
mov byte [eax + ebp], 0
mov ecx, dword [0x4f5fbc]
push str.rcon_password
mov dword [esp + 0x14], eax
add ebx, ebp
call fcn.0048b4d0
mov esi, dword [esp + 0x10]
mov edi, eax
mov cl, byte [esi]
mov dl, byte [edi]
mov al, cl
cmp cl, dl
jne 0x498268
test al, al
je 0x498264
mov dl, byte [esi + 1]
mov cl, byte [edi + 1]
mov al, dl
cmp dl, cl
jne 0x498268
add esi, 2
add edi, 2
test al, al
jne 0x498240
xor eax, eax
jmp 0x49826d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4982f4
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x44]
add eax, 2
cmp ecx, eax
jl 0x49828e
movzx ebp, word [ebx]
lea edx, [eax + ebp]
cmp ecx, edx
jge 0x498298
mov eax, dword [esp + 0x10]
push eax
jmp 0x498330
lea ecx, [ebp + 1]
push ecx
call fcn.00498d94
mov ecx, ebp
mov edx, ecx
shr ecx, 2
lea esi, [ebx + 2]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [eax + ebp], 0
mov ecx, dword [0x4f5fbc]
add esp, 4
test ecx, ecx
mov dword [esp + 0x44], eax
je 0x4982e9
push eax
mov dword [0x515d18], 1
call fcn.0048b610
mov eax, dword [esp + 0x44]
mov dword [0x515d18], 0
push eax
call fcn.00498da6
add esp, 4
jmp 0x49832b
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
push eax
push str.BAD_RCON_ATTEMPT_BY:__s
call fcn.0048c8d0
push str.Invalid_RCON_password.
mov dword [0x515d18], 1
call fcn.00497ae0
add esp, 0xc
mov dword [0x515d18], 0
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00498da6
add esp, 4
xor eax, eax
mov dword [0x515d20], eax
mov dword [0x515d1c], eax
mov dword [0x4e5974], 0xffffffff
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret