Function at 0x406980
Capabilities:
Encode data using xor
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov dword [ebp - 4], 0x45ed08
mov ebx, dword [ebp - 4]
push esi
push edi
mov edi, dword [ebp - 4]
add edi, 0x14
cmp byte [ebx + 0x13], 0
je 0x4069e2
mov esi, dword [ebx + 0xf]
lea eax, [esi + 1]
push eax
call fcn.0042ec30
add esp, 4
mov ecx, eax
xor edx, edx
mov dword [ebp - 4], ecx
test esi, esi
je 0x4069d9
sub edi, ecx
jmp 0x4069c0
mov eax, edx
add ecx, edx
and eax, 7
inc edx
mov al, byte [eax + ebx + 7]
xor al, byte [edi + ecx]
mov byte [ecx], al
mov ecx, dword [ebp - 4]
cmp edx, dword [ebx + 0xf]
jb 0x4069c0
mov eax, dword [ebx + 0xf]
mov edi, ecx
mov byte [ecx + eax], 0
mov esi, dword [ebp + 0xc]
add esi, 2
mov dword [ebp - 8], esi
mov eax, esi
lea ecx, [ecx]
mov cl, byte [eax]
cmp cl, byte [edi]
jne 0x406a10
test cl, cl
je 0x406a0c
mov cl, byte [eax + 1]
cmp cl, byte [edi + 1]
jne 0x406a10
add eax, 2
add edi, 2
test cl, cl
jne 0x4069f0
xor eax, eax
jmp 0x406a15
sbb eax, eax
or eax, 1
test eax, eax
je 0x406b2d
mov dword [ebp - 4], 0x45ed28
mov ebx, dword [ebp - 4]
mov edi, dword [ebp - 4]
add edi, 0x14
cmp byte [ebx + 0x13], 0
je 0x406a75
mov esi, dword [ebx + 0xf]
lea eax, [esi + 1]
push eax
call fcn.0042ec30
add esp, 4
mov ecx, eax
xor edx, edx
mov dword [ebp - 4], ecx
test esi, esi
je 0x406a69
sub edi, ecx
nop
mov eax, edx
add ecx, edx
and eax, 7
inc edx
mov al, byte [eax + ebx + 7]
xor al, byte [edi + ecx]
mov byte [ecx], al
mov ecx, dword [ebp - 4]
cmp edx, dword [ebx + 0xf]
jb 0x406a50
mov eax, dword [ebx + 0xf]
mov edi, ecx
mov esi, dword [ebp - 8]
mov byte [ecx + eax], 0
mov eax, esi
mov cl, byte [eax]
cmp cl, byte [edi]
jne 0x406a97
test cl, cl
je 0x406a93
mov cl, byte [eax + 1]
cmp cl, byte [edi + 1]
jne 0x406a97
add eax, 2
add edi, 2
test cl, cl
jne 0x406a77
xor eax, eax
jmp 0x406a9c
sbb eax, eax
or eax, 1
test eax, eax
je 0x406b2d
mov dword [ebp - 4], 0x45ed4c
mov ebx, dword [ebp - 4]
mov edi, dword [ebp - 4]
add edi, 0x14
cmp byte [ebx + 0x13], 0
je 0x406afb
mov esi, dword [ebx + 0xf]
lea eax, [esi + 1]
push eax
call fcn.0042ec30
add esp, 4
mov ecx, eax
xor edx, edx
mov dword [ebp - 4], ecx
test esi, esi
je 0x406aef
sub edi, ecx
mov eax, edx
add ecx, edx
and eax, 7
inc edx
mov al, byte [eax + ebx + 7]
xor al, byte [edi + ecx]
mov byte [ecx], al
mov ecx, dword [ebp - 4]
cmp edx, dword [ebx + 0xf]
jb 0x406ad6
mov eax, dword [ebx + 0xf]
mov edi, ecx
mov esi, dword [ebp - 8]
mov byte [ecx + eax], 0
mov eax, esi
lea ecx, [ecx]
mov cl, byte [eax]
cmp cl, byte [edi]
jne 0x406b20
test cl, cl
je 0x406b1c
mov cl, byte [eax + 1]
cmp cl, byte [edi + 1]
jne 0x406b20
add eax, 2
add edi, 2
test cl, cl
jne 0x406b00
xor eax, eax
jmp 0x406b25
sbb eax, eax
or eax, 1
test eax, eax
jne 0x406bcd
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov ecx, ebx
movzx eax, word [edi + 0x22]
push eax
push esi
call fcn.00408cb0
test eax, eax
movzx eax, word [edi + 0x22]
push eax
push esi
jne 0x406b69
push str.Error_StartServerForServer:_IP_s__t_Port_d_
push 4
push 0x474174
call fcn.00406e10
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push str.StartServerForServer:_IP_s__t_Port_d_
push 4
push 0x474174
call fcn.00406e10
movzx eax, word [edi]
add esp, 0x14
cmp eax, 2
je 0x406b8a
cmp eax, 1
jne 0x406bbf
movzx eax, word [edi + 0x24]
lea esi, [edi + 0x12]
push eax
push esi
mov ecx, ebx
call fcn.00408cd0
test eax, eax
movzx eax, word [edi + 0x24]
push eax
push esi
jne 0x406bab
push str.Error_StartServerForUser:_IP_s__t_Port_d_
jmp 0x406b4f
push str.StartServerForUser:__IP_s__t_Port_d_
push 4
push 0x474174
call fcn.00406e10
add esp, 0x14
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0
push 0
push str.Not_IP_register_is_not_exist._this_server_will_be_closed
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call fcn.0042ec10
int3