Function at 0x406610
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x45e7e6
push eax
mov dword fs:[0], esp
sub esp, 0x898
push ebx
mov ebx, ecx
mov edx, dword [ebx + 0x48]
cmp edx, 5
jb 0x40665d
mov ecx, dword [ebx + 0x40]
mov al, byte [ecx]
test al, 3
je 0x406675
push 1
push str.Protocol_error:_Unknown_command_type__closing_connection.
mov ecx, ebx
call fcn.00406340
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 8]
mov ecx, dword [ebx + 0x30]
push ebx
call fcn.00404c30
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x898]
mov dword fs:[0], ecx
add esp, 0x8a4
ret
push ebp
mov ebp, dword [ecx + 1]
cmp ebp, 0xffffff
jbe 0x4066b8
push 1
push str.Protocol_error:_Invalid_data_length__closing_connection.
mov ecx, ebx
call fcn.00406340
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 8]
mov ecx, dword [ebx + 0x30]
push ebx
call fcn.00404c30
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x898]
mov dword fs:[0], ecx
add esp, 0x8a4
ret
push esi
lea esi, [ebp + 5]
cmp edx, esi
jb 0x4066f3
mov edx, dword [ebx + 0x4c]
shr eax, 2
and eax, 0x1f
test edx, edx
je 0x406891
test eax, eax
je 0x40670d
push 1
push str.Protocol_error:_Not_authenticated__closing_connection.
mov ecx, ebx
call fcn.00406340
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 8]
mov ecx, dword [ebx + 0x30]
push ebx
call fcn.00404c30
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x898]
mov dword fs:[0], ecx
add esp, 0x8a4
ret
cmp ebp, 0x10
je 0x40674a
push 1
push str.Protocol_error:_Auth_data_len_invalid__closing_connection.
mov ecx, ebx
call fcn.00406340
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 8]
mov ecx, dword [ebx + 0x30]
push ebx
call fcn.00404c30
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x898]
mov dword fs:[0], ecx
add esp, 0x8a4
ret
lea ecx, [esp + 0x28]
call fcn.004202e0
push 8
lea eax, [ebx + 0x50]
push eax
lea ecx, [esp + 0x30]
call fcn.00421090
lea ecx, [esp + 0x94]
call fcn.00422500
push 0x12
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x9c]
mov dword [esp + 0x8b4], 0
call fcn.00426c90
mov eax, dword [esp + 0x20]
cmp eax, 6
mov byte [esp + 0x8ac], 1
jge 0x4067f5
push 1
push str.Protocol_error:_Server_misconfigured__admin_password_not_set_correctly
mov ecx, ebx
call fcn.00406340
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 8]
mov ecx, dword [ebx + 0x30]
push ebx
call fcn.00404c30
lea ecx, [esp + 0xc]
call fcn.00401fd0
lea ecx, [esp + 0x94]
mov dword [esp + 0x8ac], 0xffffffff
call fcn.00421770
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x898]
mov dword fs:[0], ecx
add esp, 0x8a4
ret
cmp dword [esp + 0x24], 0x10
mov ecx, dword [esp + 0x10]
jae 0x406804
lea ecx, [esp + 0x10]
push edi
push eax
push ecx
lea ecx, [esp + 0x34]
call fcn.00421090
push 8
lea eax, [ebx + 0x58]
push eax
lea ecx, [esp + 0x34]
call fcn.00421090
lea ecx, [esp + 0x2c]
call fcn.00421180
lea ecx, [esp + 0x2c]
call fcn.00421260
mov esi, dword [ebx + 0x40]
add esi, 5
mov ecx, 4
mov edi, eax
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
pop edi
je 0x40685f
push 1
push str.Protocol_error:_Auth_failed__closing_connection.
mov ecx, ebx
call fcn.00406340
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 8]
jmp 0x4067b2
push eax
call fcn.0044c004
add esp, 4
mov ecx, ebx
call fcn.00406480
lea ecx, [esp + 0xc]
call fcn.00401fd0
lea ecx, [esp + 0x94]
mov dword [esp + 0x8ac], 0xffffffff
call fcn.00421770
jmp 0x4068a0
push ebp
add ecx, 5
push ecx
mov ecx, dword [ebx + 0x30]
push eax
push ebx
call fcn.00404b40
mov ecx, dword [ebx + 0x48]
mov eax, dword [ebx + 0x40]
sub ecx, ebp
sub ecx, 5
push ecx
lea edx, [eax + ebp + 5]
push edx
push eax
call fcn.0044b5f0
mov ecx, dword [ebx + 0x48]
add esp, 0xc
mov eax, 0xfffffffb
sub eax, ebp
add ecx, eax
mov dword [ebx + 0x48], ecx
mov ecx, dword [esp + 0x8a4]
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x8a4
ret