Function at 0x405350
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x40b004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [0x40b3e4]
mov ebx, edx
mov dword [ebp - 0xfc], eax
mov ecx, edi
mov eax, dword [ebp + 0x14]
mov dword [ebp - 8], eax
mov dword [ebp - 0x100], edi
call fcn.004033d0
mov eax, dword [ebp + 8]
lea esi, [edi + 0x4c]
mov dword [edi + 8], eax
mov ax, word [ebp + 0x1c]
mov word [edi + 0x26], ax
mov ax, word [ebp + 0xc]
mov word [edi + 0xc], ax
mov al, byte [ebp + 0x18]
mov byte [edi + 1], al
mov eax, dword [ebp + 0x20]
mov dword [edi + 0x13c], eax
mov eax, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
mov byte [esi], 0
test ebx, ebx
je 0x4053cc
push ebx
push 0x40
push esi
call eax
mov eax, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
add esp, 0xc
push dword [ebp - 0xfc]
lea ebx, [edi + 0x8c]
push 0x20
push ebx
call eax
add esp, 0xc
lea eax, [edi + 0xac]
push dword [ebp - 8]
push 0x20
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
add esp, 0xc
lea eax, [edi + 0xac]
push eax
push ebx
push str._s_s
lea eax, [ebp - 0xa0]
push 0x80
push eax
call fcn.00401710
add esp, 0x14
mov dword [ebp - 0xe4], 0
lea edx, [ebp - 0xa0]
mov dword [ebp - 0xe8], 0
lea ecx, [ebp - 0xf8]
mov dword [ebp - 0xf8], 0x67452301
mov dword [ebp - 0xf4], 0xefcdab89
push eax
mov dword [ebp - 0xf0], 0x98badcfe
mov dword [ebp - 0xec], 0x10325476
call fcn.00405960
mov edx, dword [ebp - 0xe8]
mov ecx, 0x78
mov eax, dword [ebp - 0xe4]
add esp, 4
mov dword [ebp - 0xc], edx
shr edx, 3
mov dword [ebp - 8], eax
and edx, 0x3f
sub ecx, edx
mov eax, 0x38
sub eax, edx
cmp edx, 0x38
mov edx, 0x40b038
cmovae eax, ecx
lea ecx, [ebp - 0xf8]
push eax
call fcn.00405960
add esp, 4
lea edx, [ebp - 0xc]
lea ecx, [ebp - 0xf8]
push 8
call fcn.00405960
mov eax, dword [ebp - 0xf8]
add esp, 4
mov ecx, dword [ebp - 0xf4]
mov dword [edi + 0x44], eax
mov eax, dword [ebp + 0x2c]
mov dword [edi + 0x48], ecx
test eax, eax
js 0x4054d9
mov dword [edi + 0x138], eax
mov eax, dword [edi + 8]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x1c]
push 0x10
push eax
lea eax, [ebp - 8]
push eax
push 2
call dword [sym.imp.WS2_32.dll_inet_ntop]
cmp byte [edi + 1], 0
lea eax, [edi + 0xac]
push eax
movzx eax, word [edi + 0x26]
mov ecx, 0x59
push ebx
push eax
mov eax, 0x4e
cmovne eax, ecx
push eax
movzx eax, word [edi + 0xc]
push eax
lea eax, [ebp - 0x1c]
push eax
push esi
push str.set_peer_domain__s_ip__s_port__u_encryption__c_mtu__u_username__s_password__s
call fcn.00402ef0
movzx eax, byte [edi + 0x4b]
push eax
movzx eax, byte [edi + 0x4a]
push eax
movzx eax, byte [edi + 0x49]
push eax
movzx eax, byte [edi + 0x48]
push eax
movzx eax, byte [edi + 0x47]
push eax
movzx eax, byte [edi + 0x46]
push eax
movzx eax, byte [edi + 0x45]
push eax
movzx eax, byte [edi + 0x44]
push eax
push str.client_session_key__02x_02x_02x_02x_02x_02x_02x_02x
call fcn.00402ef0
xor eax, eax
mov dword [edi + 4], 0
add esp, 0x44
mov word [edi + 0x20], ax
mov word [edi + 0x24], ax
mov byte [edi + 2], al
mov dword [edi + 0x28], eax
push 0x54
push eax
mov dword [edi + 0x2c], eax
mov dword [edi + 0x34], eax
mov dword [edi + 0x38], eax
mov dword [edi + 0x3c], eax
mov dword [edi + 0x40], eax
lea eax, [edi + 0xcc]
push eax
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x30], 0x4c4b40
mov byte [edi], 1
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp + 0x28]
add esp, 0xc
xor esi, esi
test eax, eax
jle 0x4055ee
mov ebx, dword [ebp + 0x24]
lea eax, [edi + 0x144]
mov edi, dword [ebp + 0x28]
nop dword [eax]
mov ecx, dword [ebx + esi*8]
lea eax, [eax + 8]
mov dword [eax - 0xc], ecx
mov edx, dword [ebx + esi*8 + 4]
inc esi
mov dword [eax - 8], edx
cmp esi, edi
jl 0x4055d0
mov edi, dword [ebp - 0x100]
mov eax, dword [ebp + 0x28]
mov ecx, edi
mov dword [edi + 0x240], eax
call fcn.00403680
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406188
mov esp, ebp
pop ebp
ret