Function at 0x497c50
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 0x4983eb
mov ebx, dword [esp + 0x40]
cmp dword [ebx], 0x504d4153
jne 0x4983eb
mov eax, dword [0x4f5fb8]
test eax, eax
je 0x4983eb
cmp dword [eax + 0x5e], 1
jne 0x4983eb
cmp edi, 0xb
jl case.0x497cf2.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 0x497cdb
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.0x497cf2.101
movzx edx, byte [eax + 0x498414]
jmp dword [edx*4 + 0x4983f8]
push esi
call fcn.00497a70
add esp, 4
test eax, eax
jne case.0x497cf2.101
cmp edi, 0xf
jne case.0x497cf2.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.0x497cf2.101
push esi
call fcn.00497ab0
add esp, 4
test eax, eax
jne case.0x497cf2.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 0x497d75
sub eax, edx
cmp eax, 0x32
mov dword [esp + 0x38], eax
jbe 0x497d8f
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 0x497da8
sub ebp, ecx
cmp ebp, 0x1e
jbe 0x497dbc
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 0x497dd3
sub eax, edx
cmp eax, 0x1e
mov dword [esp + 0x10], eax
jbe 0x497ded
mov dword [esp + 0x10], 0x1e
mov ecx, dword [0x4f5fb8]
mov esi, dword [ecx + 8]
test esi, esi
je case.0x497cf2.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.00498e24
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.00498e36
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.0x497cf2.101
push esi
call fcn.00497b30
add esp, 4
test eax, eax
jne case.0x497cf2.101
mov edx, dword [0x4f5fb8]
mov ecx, dword [edx + 8]
test ecx, ecx
mov dword [esp + 0x44], ecx
je case.0x497cf2.101
call fcn.00466a40
mov esi, eax
cmp si, 0x64
ja case.0x497cf2.101
movzx eax, si
imul eax, eax, 0x1d
add eax, 0xd
push eax
call fcn.00498e24
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 0x49802c
movzx ecx, bx
mov eax, dword [esi + ecx*4 + 0x2da84]
test eax, eax
jne 0x49802c
push ebx
mov ecx, esi
call fcn.00466040
test al, al
je 0x49802c
push ebx
mov ecx, esi
call fcn.00465c20
mov esi, eax
mov ecx, esi
lea edx, [ecx + 1]
jmp 0x497ff0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x497ff0
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 0x497fb6
jmp 0x498192
mov ecx, dword [0x4f5fbc]
push str.query
call fcn.0048b5f0
test al, al
je case.0x497cf2.101
push esi
call fcn.00497b30
add esp, 4
test eax, eax
jne case.0x497cf2.101
mov edx, dword [0x4f5fb8]
mov ecx, dword [edx + 8]
test ecx, ecx
mov dword [esp + 0x44], ecx
je case.0x497cf2.101
call fcn.00466a40
mov esi, eax
cmp si, 0x64
ja case.0x497cf2.101
movzx eax, si
imul eax, eax, 0x22
add eax, 0xd
push eax
call fcn.00498e24
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 0x498185
movzx ecx, bx
mov eax, dword [esi + ecx*4 + 0x2da84]
test eax, eax
jne 0x498185
push ebx
mov ecx, esi
call fcn.00466040
test al, al
je 0x498185
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 0x498115
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 0x4980d0
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.00498e36
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.0x497cf2.101
push esi
call fcn.00497af0
add esp, 4
test eax, eax
jne case.0x497cf2.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.0x497cf2.101
mov ecx, dword [0x4f5fbc]
push str.rcon
call fcn.0048b5f0
test al, al
je case.0x497cf2.101
push esi
call fcn.00497b30
add esp, 4
test eax, eax
jne case.0x497cf2.101
mov eax, dword [esp + 0x48]
mov dword [0x515d1c], ebx
add ebx, 0xb
cmp edi, 0xd
mov dword [0x4e5970], eax
mov dword [0x515d20], 0xb
jl 0x4983c8
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 0x4983c8
lea ecx, [ebp + 1]
push ecx
call fcn.00498e24
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 0x4982f8
test al, al
je 0x4982f4
mov dl, byte [esi + 1]
mov cl, byte [edi + 1]
mov al, dl
cmp dl, cl
jne 0x4982f8
add esi, 2
add edi, 2
test al, al
jne 0x4982d0
xor eax, eax
jmp 0x4982fd
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x498384
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x44]
add eax, 2
cmp ecx, eax
jl 0x49831e
movzx ebp, word [ebx]
lea edx, [eax + ebp]
cmp ecx, edx
jge 0x498328
mov eax, dword [esp + 0x10]
push eax
jmp 0x4983c0
lea ecx, [ebp + 1]
push ecx
call fcn.00498e24
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 0x498379
push eax
mov dword [0x515d18], 1
call fcn.0048b610
mov eax, dword [esp + 0x44]
mov dword [0x515d18], 0
push eax
call fcn.00498e36
add esp, 4
jmp 0x4983bb
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.00497b70
add esp, 0xc
mov dword [0x515d18], 0
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00498e36
add esp, 4
xor eax, eax
mov dword [0x515d20], eax
mov dword [0x515d1c], eax
mov dword [0x4e5970], 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