Function at 0x408ac0
Capabilities:
Resolve function by parsing pe exports
Terminate process

Disassembly:
sub esp, 8
push ebx
mov ebx, dword [esp + 0x10]
push ebp
push esi
test ebx, ebx
push edi
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0xffffffff
je 0x408c04
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x20]
mov ax, word [ebx]
mov dword [esp + 0x10], eax
cmp ax, word [ebx + 2]
ja 0x408bf9
xor ecx, ecx
test ebp, ebp
setne cl
inc ecx
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x1c]
xor edx, edx
mov dx, word [ebx + 0x24]
test ecx, edx
je 0x408bea
test ebp, ebp
mov ecx, 0x41b958
jne 0x408b28
mov ecx, 0x41b954
and eax, 0xffff
push eax
push ecx
push str.creating__s_mode_local_listener_socket_for_port__hu
push 0
push 3
call fcn.00404de0
mov edx, dword [0x41e3e4]
push ebp
lea eax, [esp + 0x28]
push edx
push eax
call fcn.00405f60
mov esi, eax
add esp, 0x20
cmp esi, 0xffffffff
je 0x408c10
mov ecx, dword [esp + 0x10]
push esi
and ecx, 0xffff
push ecx
push str.local_port__hu_has_socket__d
push 0
push 5
call fcn.00404de0
mov eax, dword [edi]
add esp, 0x14
cmp eax, 0x40
jae 0x408b8a
mov dword [edi + eax*4 + 4], esi
mov eax, dword [edi]
inc eax
mov dword [edi], eax
cmp esi, dword [esp + 0x14]
jle 0x408b94
mov dword [esp + 0x14], esi
mov eax, dword [0x41e3ac]
test eax, eax
jne 0x408bb3
mov edx, dword [esp + 0x10]
and edx, 0xffff
push edx
push str.Listening_on_local_port__hu
push 0
push 1
jmp 0x408bc6
mov eax, dword [esp + 0x10]
and eax, 0xffff
push eax
push str.listening_on_local_port__hu
push 0
push 3
call fcn.00404de0
add esp, 0x10
cmp word [ebx + 2], 0
jne 0x408be6
mov cx, word [esp + 0x10]
mov word [ebx + 2], cx
mov dx, word [esp + 0x10]
mov word [ebx], dx
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp ax, word [ebx + 2]
jbe 0x408b08
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
jne 0x408aeb
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
push str.cant_create_listener_socket
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
push 0
call fcn.00404de0
add esp, 0xc
push 1
call dword [sym.imp.MSVCRT.dll_exit]
sub esp, 0xca0
push ebx
push ebp
push esi
mov ebp, dword [0x41e3bc]
push edi
mov edi, dword [esp + 0xcb4]
mov esi, dword [0x41e3b0]
mov ebx, dword [0x41a544]
mov eax, dword [edi]
mov ecx, dword [edi + 0x1c]
mov edx, dword [edi + 0x20]
mov dword [esp + 0x40], eax
xor eax, eax
push 1
mov dword [esp + 0x78], ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x40], 0x16
mov dword [esp + 0x38], eax
mov dword [esp + 0x70], ecx
mov dword [esp + 0x74], edx
call fcn.00404ca0
push str.client_routine_entered
push 0
push 3
call fcn.00404de0
mov dx, word [edi + 4]
lea eax, [esp + 0x90]
lea ecx, [esp + 0x44]
push eax
push ecx
push edx
call fcn.004081d0
add esp, 0x1c
mov dword [esp + 0x20], eax
test ax, ax
je 0x409c95
and eax, 0xffff
xor ecx, ecx
mov cx, word [edi + 4]
mov dword [esp + 0x38], eax
push eax
mov eax, dword [esp + 0x38]
push eax
push ecx
push str.client_on_local_port__hu_tunnels_to_target__s:_hu
push 0
push 3
call fcn.00404de0
mov edx, dword [esp + 0x9c]
add esp, 0x18
push edx
call sub.WS2_32.dll_ntohl
push eax
push str.target_address_is__08x
push 0
push 4
call fcn.00404de0
mov eax, dword [0x41e3e8]
add esp, 0x10
test eax, eax
je 0x408d83
push str.waiting_for_connection_from_server
push 0
push 3
call fcn.00404de0
mov ax, word [0x41a554]
mov ecx, dword [0x41a550]
push eax
push 1
push ebp
push ecx
call fcn.00406180
mov esi, eax
add esp, 0x1c
cmp esi, 0xffffffff
mov dword [esp + 0x14], esi
jne 0x408d70
push ebp
push str.failed_to_accept_a_connection_from__s
call dword [sym.imp.MSVCRT.dll__errno]
mov edx, dword [eax]
push edx
push 0
call fcn.00404de0
add esp, 0x10
jmp 0x408e7c
push str.accepted_connection_from_server
push 0
push 3
call fcn.00404de0
add esp, 0xc
jmp 0x408dea
mov edi, esi
and edi, 0xffff
push edi
push ebp
push str.making_connection_to__s:_hu
push 0
push 3
call fcn.00404de0
push 0
push 0
push 1
push 0
push esi
push ebp
call fcn.00405b90
add esp, 0x2c
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
push edi
push ebp
jne 0x408dd5
push str.cant_connect_to__s_port__hu
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
push 0
call fcn.00404de0
add esp, 0x14
jmp 0x408e7c
push str.connected_to__s:_hu
push 0
push 3
call fcn.00404de0
mov esi, dword [esp + 0x28]
add esp, 0x14
push str.validating_server_IP_address
push 0
push 3
call fcn.00404de0
lea ecx, [esp + 0x9c]
push ecx
push esi
call fcn.00408050
add esp, 0x14
test eax, eax
jne 0x408e36
mov eax, dword [esp + 0x94]
lea edx, [esp + 0xa0]
push edx
push eax
call fcn.00405b50
push eax
push str.connection_with_server__s_disallowed
push 0
push 0
call fcn.00404de0
add esp, 0x18
jmp 0x408e7c
push 0x201
push str.requesting_protocol_version__hx
push 0
push 3
call fcn.00404de0
lea ecx, [esp + 0x20]
push ecx
push 0x201
push esi
call fcn.00405970
add esp, 0x1c
test eax, eax
jne 0x408f1c
push str.failed_requesting_protocol_version
call dword [sym.imp.MSVCRT.dll__errno]
mov edx, dword [eax]
push edx
push 0
call fcn.00404de0
add esp, 0xc
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x408e8b
push eax
call sub.WS2_32.dll_closesocket
mov edi, dword [esp + 0xcb4]
mov eax, dword [esp + 0x40]
mov esi, dword [sym.imp.MSVCRT.dll_free]
cmp eax, 0xffffffff
je 0x408ea7
push eax
call sub.WS2_32.dll_closesocket
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x408eb5
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x30]
test eax, eax
je 0x408ec3
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x18]
test eax, eax
je 0x408ed9
cmp eax, ebx
je 0x408ed9
push eax
call esi
add esp, 4
test ebx, ebx
je 0x408ee3
push ebx
call esi
add esp, 4
mov eax, dword [esp + 0x28]
push eax
call fcn.004053f0
lea ecx, [edi + 8]
push ecx
call fcn.00408560
push edi
call esi
push 0xffffffffffffffff
call fcn.00404ca0
mov eax, dword [esp + 0x7c]
add esp, 0x10
test eax, eax
jne 0x408f11
call dword [sym.imp.MSVCRT.dll__endthread]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xca0
ret
mov eax, dword [esp + 0x10]
and eax, 0xffff
cmp eax, 0x102
jg 0x408f55
je 0x408f4e
mov ecx, eax
sub ecx, 0
je 0x408f47
sub ecx, 0x100
je 0x408f47
dec ecx
jne 0x408f62
mov ebp, 0x101
jmp 0x408f85
mov ebp, 0x100
jmp 0x408f85
mov ebp, 0x102
jmp 0x408f85
mov ecx, eax
sub ecx, 0x200
je 0x408f80
dec ecx
je 0x408f79
push eax
push str.server_responded_with_incompatible_protocol_version___hx_
push 0
push 0
call fcn.00404de0
add esp, 0x10
jmp 0x408e7c
mov ebp, 0x201
jmp 0x408f85
mov ebp, 0x200
push eax
push str.accepted_protocol_version__hx
push 0
push 3
mov dword [esp + 0x2c], ebp
call fcn.00404de0
add esp, 0x10
cmp bp, 0x200
jb 0x409413
mov edi, dword [esp + 0x70]
mov eax, 0x41b958
test edi, edi
jne 0x408fb8
mov eax, 0x41b954
push eax
push str.requesting__s_mode
push 0
push 3
call fcn.00404de0
xor eax, eax
push 0
test edi, edi
setne al
lea ecx, [esp + 0x64]
push eax
push ecx
call fcn.00406410
mov edx, ebx
and edx, 0xffff
push edx
push str.requesting_buffer_size__hu
push 0
push 3
call fcn.00404de0
push 2
lea eax, [esp + 0x80]
push ebx
push eax
call fcn.00406410
xor ecx, ecx
mov cx, word [0x41a532]
push ecx
push str.requesting_compression_level__hx
push 0
push 3
call fcn.00404de0
mov dx, word [0x41a532]
add esp, 0x48
lea eax, [esp + 0x50]
push 4
push edx
push eax
call fcn.00406410
mov ecx, dword [esp + 0x44]
push ecx
push str.requesting_redirection_to_port__hu
push 0
push 3
call fcn.00404de0
mov edx, dword [esp + 0x3c]
push 6
lea eax, [esp + 0x70]
push edx
push eax
call fcn.00406410
mov ecx, dword [0x41a530]
and ecx, 0xffff
push ecx
push str.requesting_key_length__hu
push 0
push 3
call fcn.00404de0
mov dx, word [0x41a530]
push 8
lea eax, [esp + 0x8c]
push edx
push eax
call fcn.00406410
add esp, 0x44
call fcn.00407690
mov esi, eax
push esi
push str.requesting_key_reuse_token__lx
push 0
push 3
call fcn.00404de0
push 0xa
lea ecx, [esp + 0x64]
push esi
push ecx
call fcn.00406430
lea edx, [esp + 0x64]
push edx
call fcn.00406aa0
mov eax, dword [esp + 0x69]
mov ecx, dword [esp + 0x68]
and eax, 0xff
and ecx, 0xff
push eax
push ecx
push str.sending_client_nonce__02x_02x...
push 0
push 3
call fcn.00404de0
mov edx, dword [esp + 0x7c]
mov eax, dword [esp + 0x80]
add esp, 0x34
cmp bp, 0x200
mov dword [esp + 0x5e], edx
mov dword [esp + 0x62], eax
jbe 0x409194
mov esi, dword [0x41e3bc]
mov eax, dword [esp + 0x34]
mov ebp, 0x1a
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x409132
test cl, cl
je 0x40912e
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x409132
add eax, 2
add esi, 2
test cl, cl
jne 0x40910a
xor eax, eax
jmp 0x409137
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x409156
push str.target_is_the_same_as_the_server
push eax
push 4
call fcn.00404de0
add esp, 0xc
mov dword [esp + 0x84], 0
mov eax, dword [esp + 0x84]
push eax
call sub.WS2_32.dll_ntohl
push eax
push str.requesting_target_address__08x
push 0
push 3
call fcn.00404de0
mov ecx, dword [esp + 0x94]
add esp, 0x10
push 0x16
push ecx
call sub.WS2_32.dll_ntohl
lea edx, [esp + 0x54]
push eax
push edx
call fcn.00406430
add esp, 0xc
jmp 0x409198
mov ebp, dword [esp + 0x3c]
mov ebx, dword [esp + 0x14]
lea eax, [esp + 0x50]
push ebp
mov esi, ebp
push eax
push ebx
and esi, 0xffff
call fcn.00405270
add esp, 0xc
cmp eax, esi
je 0x4091ca
push str.failed_writing_protocol_header_to_server
call dword [sym.imp.MSVCRT.dll__errno]
mov ecx, dword [eax]
push ecx
jmp 0x408e72
lea edx, [esp + 0x50]
push ebp
push edx
push ebx
call fcn.00405100
add esp, 0xc
cmp eax, esi
je 0x4091f0
push str.failed_reading_protocol_header_response_from_server
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
jmp 0x408e72
test edi, edi
push 0
je 0x409210
lea ecx, [esp + 0x54]
push ecx
call fcn.00406460
add esp, 8
cmp ax, 1
jne 0x409245
mov eax, 0x41b958
jmp 0x40926c
lea edx, [esp + 0x54]
push edx
call fcn.00406460
add esp, 8
cmp ax, 1
jne 0x409267
mov ecx, 0x41b958
mov eax, 0x41b954
push ecx
push eax
push str.client_requested__s_mode_and_server_is_in__s_mode
push 0
push 0
call fcn.00404de0
add esp, 0x14
jmp 0x408e7c
mov ecx, 0x41b954
mov eax, 0x41b958
push ecx
push eax
push str.client_requested__s_mode_and_server_is_in__s_mode
push 0
push 0
call fcn.00404de0
add esp, 0x14
jmp 0x408e7c
mov eax, 0x41b954
push eax
push str.accepted__s_mode
push 0
push 3
call fcn.00404de0
lea eax, [esp + 0x60]
push 2
push eax
call fcn.00406460
mov ebx, eax
add esp, 0x18
test bx, bx
jbe 0x409407
mov ecx, ebx
and ecx, 0xffff
push ecx
push str.accepted_buffer_size__hu
push 0
push 3
call fcn.00404de0
lea edx, [esp + 0x60]
push 4
push edx
call fcn.00406460
mov esi, eax
mov ax, word [0x41a532]
add esp, 0x18
cmp si, ax
ja 0x4093e4
mov eax, esi
and eax, 0xffff
push eax
push str.accepted_compression_level__hx
push 0
push 3
mov dword [esp + 0x4c], eax
call fcn.00404de0
lea eax, [esp + 0x60]
push 6
push eax
call fcn.00406460
add esp, 0x18
cmp ax, word [esp + 0x20]
mov dword [esp + 0x10], eax
jne 0x4093c4
push str.redirection_request_accepted
push 0
push 3
call fcn.00404de0
lea ecx, [esp + 0x5c]
push 8
push ecx
call fcn.00406460
mov ebp, eax
mov eax, dword [0x41e3a0]
add esp, 0x14
cmp bp, ax
jb 0x4093b2
mov eax, ebp
and eax, 0xffff
push eax
push str.accepted_key_length__hu
push 0
push 3
mov dword [esp + 0x30], eax
call fcn.00404de0
lea edx, [esp + 0x60]
push 0xa
push edx
call fcn.00406480
mov edi, eax
push edi
push str.accepted_key_reuse_token__lx
push 0
push 3
mov dword [esp + 0x6c], edi
call fcn.00404de0
mov eax, dword [esp + 0x86]
mov edx, dword [esp + 0x87]
mov ecx, dword [esp + 0x8a]
mov dword [esp + 0xa0], eax
and edx, 0xff
and eax, 0xff
push edx
push eax
push str.received_server_nonce__02x_02x...
push 0
push 3
mov dword [esp + 0xb8], ecx
call fcn.00404de0
add esp, 0x3c
jmp 0x4095fa
and eax, 0xffff
and ebp, 0xffff
push eax
push ebp
jmp 0x4095c5
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
push eax
push ecx
push str.server_refused_request_for_redirection_to__s:_hu
push 0
push 0
call fcn.00404de0
add esp, 0x14
jmp 0x408e7c
xor edx, edx
and esi, 0xffff
mov dx, ax
push edx
push esi
push str.server_responded_with_invalid_compression_level___hx____hx_
push 0
push 0
call fcn.00404de0
add esp, 0x14
jmp 0x408e7c
push str.server_responded_with_zero_buffer_size
push 0
jmp 0x408e72
cmp bp, 0x101
jb 0x40946a
mov eax, ebx
and eax, 0xffff
push eax
push str.requesting_buffer_size__hu
push 0
push 3
call fcn.00404de0
lea ecx, [esp + 0x20]
push ecx
push ebx
push esi
call fcn.00405970
add esp, 0x1c
test eax, eax
jne 0x40944d
push str.failed_requesting_buffer_size
jmp 0x408e69
mov eax, dword [esp + 0x10]
mov ebx, eax
and eax, 0xffff
push eax
push str.accepted_buffer_size__hu
push 0
push 3
call fcn.00404de0
add esp, 0x10
xor eax, eax
mov ax, word [0x41a532]
push eax
push str.requesting_compression_level__hx
push 0
push 3
call fcn.00404de0
mov dx, word [0x41a532]
lea ecx, [esp + 0x20]
push ecx
push edx
push esi
call fcn.00405970
add esp, 0x1c
test eax, eax
jne 0x4094ae
push str.failed_requesting_compression_level
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
jmp 0x408e72
mov eax, dword [esp + 0x10]
mov cx, word [0x41a532]
cmp ax, cx
jbe 0x4094e0
xor edx, edx
and eax, 0xffff
mov dx, cx
push edx
push eax
push str.server_responded_with_invalid_compression_level___hx____hx_
push 0
push 0
call fcn.00404de0
add esp, 0x14
jmp 0x408e7c
mov esi, eax
and eax, 0xffff
push eax
push str.accepted_compression_level__hx
push 0
push 3
mov dword [esp + 0x4c], eax
call fcn.00404de0
mov ebp, dword [esp + 0x48]
push ebp
push str.requesting_redirection_to_port__hu
push 0
push 3
call fcn.00404de0
mov edi, dword [esp + 0x40]
mov ecx, dword [esp + 0x34]
lea eax, [esp + 0x30]
push eax
push edi
push ecx
call fcn.00405970
add esp, 0x2c
test eax, eax
jne 0x409532
push str.failed_requesting_redirection_port
jmp 0x408e69
cmp word [esp + 0x10], di
je 0x409557
push ebp
push str.server_refused_request_for_redirection_to_port__hu
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
push 0
call fcn.00404de0
add esp, 0x10
jmp 0x408e7c
push str.redirection_request_accepted
push 0
push 3
call fcn.00404de0
mov ecx, dword [0x41a530]
and ecx, 0xffff
push ecx
push str.requesting_key_length__hu
push 0
push 3
call fcn.00404de0
mov ax, word [0x41a530]
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x2c]
push edx
push eax
push ecx
call fcn.00405970
add esp, 0x28
test eax, eax
jne 0x4095a7
push str.failed_requesting_key_length
jmp 0x408e69
mov eax, dword [esp + 0x10]
mov ecx, dword [0x41e3a0]
cmp ax, cx
mov ebp, eax
jae 0x4095db
and ecx, 0xffff
and eax, 0xffff
push ecx
push eax
push str.server_key_length_too_small___hu____hu_
push 0
push 0
call fcn.00404de0
add esp, 0x14
jmp 0x408e7c
and eax, 0xffff
push eax
push str.accepted_key_length__hu
push 0
push 3
mov dword [esp + 0x30], eax
call fcn.00404de0
mov edi, dword [esp + 0x54]
add esp, 0x10
push esi
push ebx
call fcn.00405370
mov esi, eax
add esp, 8
test esi, esi
mov dword [esp + 0x28], esi
jne 0x409621
push str.client_failed_to_allocate_message_buffer
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
jmp 0x408e72
mov ebx, dword [esp + 0x1c]
cmp bx, 0x200
jb 0x409737
push edi
push 0x41e418
call fcn.00407390
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
je 0x409737
lea ecx, [esp + 0x78]
push ebp
lea edx, [esp + 0x4c]
push ecx
mov ebx, eax
push edx
push ebx
call fcn.00406c00
mov esi, eax
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ecx + esi - 4]
push eax
push str.session_key_ends_..._s
push 0
push 3
call fcn.00404de0
push ebp
push esi
call fcn.004064c0
mov edi, dword [esp + 0x50]
push ebp
push esi
mov dword [edi + 0x8104], eax
call fcn.004064c0
mov dword [edi + 0x8100], eax
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ebx
mov edx, ecx
push ebx
shr ecx, 2
mov ebx, dword [sym.imp.MSVCRT.dll_free]
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
call ebx
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
xor ebp, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, esi
mov edx, ecx
push esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x50], ebp
and ecx, 3
rep stosb byte es:[edi], al
call ebx
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x4c]
push eax
push ecx
mov dword [esp + 0x64], ebp
call fcn.00406fe0
add esp, 0x40
test eax, eax
jne 0x409b96
mov edx, dword [0x41e3d8]
push edx
push str.challenge_response_failed_to_validate_shared_key__session_token___08x_
push eax
push eax
call fcn.00404de0
push 2
call fcn.00404bc0
push 2
mov dword [0x41e3d8], 0xffffffff
call fcn.00404be0
add esp, 0x18
jmp 0x408e7c
test bp, bp
ja 0x409777
cmp bx, 0x102
jb 0x409777
push str.key_length_is_zero__omitting_key_exchange
push 0
push 3
call fcn.00404de0
mov eax, dword [0x41e3c0]
add esp, 0xc
test eax, eax
je 0x409b96
push str.Warning:_agreed_key_length_is_zero__no_identity_checking_performed
push 0
push 1
call fcn.00404de0
add esp, 0xc
jmp 0x409b96
push str.reading_DH_generator
push 0
push 3
call fcn.00404de0
mov edi, dword [esp + 0x20]
push 0x400
push esi
push edi
call fcn.004054d0
add esp, 0x18
test eax, eax
jg 0x4097af
push str.failed_reading_DH_generator
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
jmp 0x408e72
lea ecx, [esp + 0x4b0]
push 0x400
push ecx
push esi
call fcn.00405430
lea edx, [esp + 0x4bc]
push edx
push str.accepted_generator__s
push 0
push 3
call fcn.00404de0
push str.reading_DH_modulus
push 0
push 3
call fcn.00404de0
push 0x400
push esi
push edi
call fcn.004054d0
add esp, 0x34
test eax, eax
jg 0x40980c
push str.failed_reading_DH_modulus
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
jmp 0x408e72
lea ecx, [esp + 0xb0]
push 0x400
push ecx
push esi
call fcn.00405430
lea edx, [esp + 0xbc]
push edx
push str.accepted_modulus__s
push 0
push 3
call fcn.00404de0
push str.reading_server_DH_key
push 0
push 3
call fcn.00404de0
push 0x400
push esi
push edi
call fcn.004054d0
add esp, 0x34
test eax, eax
jg 0x409869
push str.failed_reading_server_DH_key
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
jmp 0x408e72
lea ecx, [esp + 0x8b0]
push 0x400
push ecx
push esi
call fcn.00405430
lea edx, [esp + 0x8bc]
push edx
push str.accepted_server_DH_key__s
push 0
push 3
call fcn.00404de0
mov eax, dword [0x41e3c0]
add esp, 0x1c
test eax, eax
je 0x4098f2
push eax
push str.checking_key_against_identity_file__s
push 0
push 3
call fcn.00404de0
lea eax, [esp + 0x8c0]
lea ecx, [esp + 0xc0]
push eax
mov eax, dword [0x41e3c0]
lea edx, [esp + 0x4c4]
push ecx
push edx
push eax
call fcn.00407c00
add esp, 0x20
test eax, eax
jne 0x4098f2
mov ecx, dword [0x41e3c0]
push ecx
push str.servers_identity_not_found_in__s
push eax
push eax
call fcn.00404de0
add esp, 0x10
jmp 0x408e7c
push str.generating_private_key
push 0
push 3
call fcn.00404de0
add esp, 0xc
call fcn.00406580
mov esi, eax
test esi, esi
mov dword [esp + 0x2c], esi
jne 0x40991d
push str.cant_generate_private_key
push eax
jmp 0x408e72
push str.private_key_generated
push 0
push 3
call fcn.00404de0
push str.generating_public_DH_key
push 0
push 3
call fcn.00404de0
lea edx, [esp + 0xc8]
push esi
lea eax, [esp + 0x4cc]
push edx
push eax
call fcn.00406e70
add esp, 0x24
mov dword [esp + 0x30], eax
test eax, eax
jne 0x409965
push str.cant_generate_public_DH_key
push eax
jmp 0x408e72
mov esi, dword [esp + 0x30]
push esi
push str.public_DH_key_is__s
push 0
push 3
call fcn.00404de0
push str.sending_public_DH_key
push 0
push 3
call fcn.00404de0
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push esi
mov esi, dword [esp + 0x4c]
push esi
call fcn.004054a0
mov ecx, dword [esp + 0x3c]
push esi
push ecx
call fcn.00405740
xor edx, edx
add esp, 0x30
mov dx, word [esi + 2]
cmp eax, edx
je 0x4099c8
push str.failed_writing_DH_key_to_server
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
jmp 0x408e72
push str.sent_public_DH_key
push 0
push 3
call fcn.00404de0
push str.generating_shared_secret_key
push 0
push 3
call fcn.00404de0
mov ecx, dword [esp + 0x44]
lea edx, [esp + 0xc8]
push ecx
lea eax, [esp + 0x8cc]
push edx
push eax
call fcn.00406e70
mov ebx, eax
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x3c], ebx
lea ecx, [ecx + ebx - 4]
push ecx
push str.shared_key_ends_..._s
push eax
push 3
call fcn.00404de0
add esp, 0x34
cmp word [esp + 0x1c], 0x200
jb 0x409a68
lea edx, [esp + 0x78]
push ebp
lea eax, [esp + 0x4c]
push edx
push eax
push ebx
call fcn.00406c00
mov ebx, eax
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x34], ebx
lea ecx, [ecx + ebx - 4]
push ecx
push str.session_key_ends_..._s
push eax
push 3
call fcn.00404de0
add esp, 0x20
jmp 0x409a6c
mov dword [esp + 0x24], ebx
push str.initialising_encryption_state
push 0
push 3
call fcn.00404de0
push ebp
push ebx
call fcn.004064c0
push ebp
push ebx
mov dword [esi + 0x8104], eax
call fcn.004064c0
mov edi, dword [esp + 0x48]
mov dword [esi + 0x8100], eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esp + 0x48]
not ecx
dec ecx
mov edi, edx
mov ebx, ecx
push edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [sym.imp.MSVCRT.dll_free]
call edi
mov edx, dword [esp + 0x50]
xor ebx, ebx
push edx
mov dword [esp + 0x50], ebx
call edi
mov eax, dword [esp + 0x38]
push esi
push eax
mov dword [esp + 0x5c], ebx
call fcn.00406fe0
add esp, 0x2c
test eax, eax
je 0x408e7c
cmp word [esp + 0x1c], 0x200
jb 0x409b2e
mov esi, dword [esp + 0x44]
test esi, esi
je 0x409b2e
push esi
push str.new_reusable_key_token_established___lx_
push ebx
push 3
call fcn.00404de0
mov ebx, dword [esp + 0x28]
push ebx
push esi
push 0x41e418
call fcn.004074f0
push 2
call fcn.00404bc0
push 2
mov dword [0x41e3d8], esi
call fcn.00404be0
add esp, 0x24
jmp 0x409b32
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
cmp edx, ebx
je 0x409b68
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
push edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, edx
mov esi, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [esp + 0x24], 0
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ebx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x74]
push eax
push ecx
push str.tunnel_established_to__s_port__hu
push 0
push 1
call fcn.00404de0
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x50]
push edx
push eax
push str.compression_level__hx__key_length__hu
push 0
push 2
call fcn.00404de0
push str.entering_filter_loop
push 0
push 3
call fcn.00404de0
mov edi, dword [esp + 0xce8]
mov ecx, dword [esp + 0xa4]
mov ebx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x48]
mov edx, dword [edi + 0x18]
push ecx
mov ecx, dword [esp + 0x78]
lea eax, [esp + 0xc8]
lea esi, [edi + 8]
push edx
push eax
push esi
push ebx
push ebp
push ecx
call fcn.004077b0
add esp, 0x50
cmp eax, 0xffffffff
je 0x409c82
cmp eax, 1
je 0x409c6f
push str.connection_closed
push 0
push 1
call fcn.00404de0
mov edx, dword [esp + 0x4c]
add esp, 0xc
push edx
call sub.WS2_32.dll_closesocket
push ebp
call sub.WS2_32.dll_closesocket
push ebx
call fcn.004053f0
push esi
call fcn.00408560
push edi
call dword [sym.imp.MSVCRT.dll_free]
push 0xffffffffffffffff
call fcn.00404ca0
mov eax, dword [esp + 0x7c]
add esp, 0x10
test eax, eax
jne 0x408f11
call dword [sym.imp.MSVCRT.dll__endthread]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xca0
ret
push str.failed_communicating_with_remote_server
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
jmp 0x408e72
push str.failed_communicating_with_local_client
call dword [sym.imp.MSVCRT.dll__errno]
mov ecx, dword [eax]
push ecx
jmp 0x408e72
xor edx, edx
mov dx, word [edi + 4]
push edx
push str.no_matching_target_port_for_local_port__hu
push 0
push 0
call fcn.00404de0
add esp, 0x10
jmp 0x408e92