Function at 0x401e58
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1028
call fcn.00404904
push esi
push edi
mov dword [ebp - 4], 0
imul edi, dword [ebp + 8], 0x61c
lea edi, [edi + 0x4067e4]
push edi
call sub.wsock32.dll_gethostbyname
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x401e95
mov eax, 1
jmp 0x4021d6
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 4], eax
imul edi, dword [ebp + 8], 0x61c
mov esi, dword [ebp - 4]
mov dword [edi + 0x4068e4], esi
cmp dword [ebp - 4], 0xffffffff
je 0x4021b7
mov edi, dword [ebp - 8]
mov edi, dword [edi + 0xc]
mov edi, dword [edi]
mov edi, dword [edi]
mov dword [ebp - 0x101c], edi
mov word [ebp - 0x1018], 2
push 0x19
call sub.wsock32.dll_htons
mov edi, eax
mov word [ebp - 0x1016], di
mov edi, dword [ebp - 0x101c]
mov dword [ebp - 0x1014], edi
push 0x10
lea edi, [ebp - 0x1018]
push edi
push dword [ebp - 4]
call sub.wsock32.dll_connect
cmp eax, 0
jne 0x4021b7
push dword [ebp - 4]
call fcn.004022f2
add esp, 4
push str.HELO_localhost_r_n
call sub.CRTDLL.DLL_strlen
add esp, 4
mov edi, eax
push 0
push edi
push str.HELO_localhost_r_n
push dword [ebp - 4]
call sub.wsock32.dll_send
push dword [ebp - 4]
call fcn.004022f2
add esp, 4
cmp eax, 0
je 0x401f63
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x4021d6
imul edi, dword [ebp + 8], 0x61c
lea edi, [edi + 0x4063d0]
push edi
push str.MAIL_FROM:__s__r_n
lea edi, [ebp - 0x1008]
push edi
call sub.CRTDLL.DLL_sprintf
add esp, 0xc
lea edi, [ebp - 0x1008]
push edi
call sub.CRTDLL.DLL_strlen
add esp, 4
push 0
push eax
lea edi, [ebp - 0x1008]
push edi
push dword [ebp - 4]
call sub.wsock32.dll_send
push dword [ebp - 4]
call fcn.004022f2
add esp, 4
cmp eax, 0
je 0x401fc9
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x4021d6
imul edi, dword [ebp + 8], 0x61c
lea edi, [edi + 0x4064d0]
push edi
push str.RCPT_TO:__s__r_n
lea edi, [ebp - 0x1008]
push edi
call sub.CRTDLL.DLL_sprintf
add esp, 0xc
lea edi, [ebp - 0x1008]
push edi
call sub.CRTDLL.DLL_strlen
add esp, 4
push 0
push eax
lea edi, [ebp - 0x1008]
push edi
push dword [ebp - 4]
call sub.wsock32.dll_send
push dword [ebp - 4]
call fcn.004022f2
add esp, 4
cmp eax, 0
je 0x40202f
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x4021d6
push str.DATA_r_n
call sub.CRTDLL.DLL_strlen
add esp, 4
mov edi, eax
push 0
push edi
push str.DATA_r_n
push dword [ebp - 4]
call sub.wsock32.dll_send
push dword [ebp - 4]
call fcn.004022f2
add esp, 4
cmp eax, 0
je 0x402070
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x4021d6
imul edi, dword [ebp + 8], 0x61c
lea esi, [edi + 0x4063d0]
push esi
lea esi, [edi + 0x4065d0]
push esi
lea edi, [edi + 0x4063d0]
push edi
push str.From:__s_nTo:__s_nReply_To:__s_n
lea edi, [ebp - 0x1008]
push edi
call sub.CRTDLL.DLL_sprintf
add esp, 0x14
lea edi, [ebp - 0x1008]
push edi
call sub.CRTDLL.DLL_strlen
add esp, 4
push 0
push eax
lea edi, [ebp - 0x1008]
push edi
push dword [ebp - 4]
call sub.wsock32.dll_send
push 0x405618
call fcn.0040171a
add esp, 4
mov dword [ebp - 0x1020], eax
cmp dword [ebp - 0x1020], 0
je 0x40213b
mov edi, dword [ebp - 0x1020]
mov dword [ebp - 0x1024], edi
mov dword [ebp - 0x1028], 0
jmp 0x402117
push 0
push 1
push dword [ebp - 0x1024]
push dword [ebp - 4]
call sub.wsock32.dll_send
add dword [ebp - 0x1024], 1
inc dword [ebp - 0x1028]
push dword [ebp - 0x1020]
call sub.CRTDLL.DLL_strlen
add esp, 4
cmp dword [ebp - 0x1028], eax
jb 0x4020f8
push dword [ebp - 0x1020]
call sub.CRTDLL.DLL_free
add esp, 4
push str._r_n._r_n
call sub.CRTDLL.DLL_strlen
add esp, 4
mov edi, eax
push 0
push edi
push str._r_n._r_n
push dword [ebp - 4]
call sub.wsock32.dll_send
push dword [ebp - 4]
call fcn.004022f2
add esp, 4
cmp eax, 0
je 0x402179
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x4021d6
push str.QUIT_r_n
call sub.CRTDLL.DLL_strlen
add esp, 4
mov edi, eax
push 0
push edi
push str.QUIT_r_n
push dword [ebp - 4]
call sub.wsock32.dll_send
push dword [ebp - 4]
call fcn.004022f2
add esp, 4
cmp eax, 0
je 0x4021b7
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x4021d6
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
imul edi, dword [ebp + 8], 0x61c
mov dword [edi + 0x4068e4], 0
mov eax, 0
pop edi
pop esi
leave
ret