Function at 0x4054d0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x51c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, edx
push ecx
lea eax, [ebp - 0x208]
mov esi, ecx
push eax
mov edx, str.From
mov ecx, edi
call fcn.004051c0
add esp, 8
test eax, eax
jne 0x4057b7
push ecx
lea eax, [ebp - 0x408]
push eax
mov edx, 0x411de0
mov ecx, edi
call fcn.004051c0
add esp, 8
test eax, eax
jne 0x4057b7
mov cl, byte [ebp - 0x208]
lea eax, [ebp - 0x208]
test cl, cl
je 0x4057b7
lea esp, [esp]
cmp cl, 0x40
je 0x405552
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x405540
jmp 0x4057b7
cmp byte [eax], 0
je 0x4057b7
inc eax
push eax
lea eax, [ebp - 0x308]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4057b7
push 0x10
push esi
push ebx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x4057b0
mov dword [ebp - 0x40c], eax
lea eax, [ebp - 0x410]
push eax
push 0
push 0
lea eax, [ebp - 0x518]
push eax
push 0
mov dword [ebp - 0x410], 0xf
mov dword [ebp - 0x514], ebx
mov dword [ebp - 0x518], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x4057b0
push 0
push 0x3a98
push ebx
call fcn.004053e0
add eax, 0xffffff38
add esp, 0xc
cmp eax, 0xc7
ja 0x4057b0
mov edx, str.EHLO__s_r_n
lea ecx, [ebp - 0x108]
call section..text
lea eax, [ebp - 0x308]
push eax
lea eax, [ebp - 0x108]
push eax
push 0x2710
push ebx
call fcn.004053e0
add esp, 0x10
cmp eax, 0xc8
jl 0x40562f
cmp eax, 0x12b
jle 0x405669
mov edx, str.HELO__s_r_n
lea ecx, [ebp - 0x108]
call section..text
lea eax, [ebp - 0x308]
push eax
lea eax, [ebp - 0x108]
push eax
push 0x2710
push ebx
call fcn.004053e0
add eax, 0xffffff38
add esp, 0x10
cmp eax, 0x63
ja 0x4057b0
mov edx, str.MAIL_FROM:__s__r_n
lea ecx, [ebp - 0x108]
call section..text
lea eax, [ebp - 0x208]
push eax
lea eax, [ebp - 0x108]
push eax
push 0x2710
push ebx
call fcn.004053e0
add eax, 0xffffff38
add esp, 0x10
cmp eax, 0x63
ja 0x4057b0
mov edx, str.RCPT_TO:__s__r_n
lea ecx, [ebp - 0x108]
call section..text
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x108]
push eax
push 0x2710
push ebx
call fcn.004053e0
add eax, 0xffffff38
add esp, 0x10
cmp eax, 0x63
ja 0x4057b0
push str.DATA_r_n
push 0x2710
push ebx
call fcn.004053e0
add eax, 0xffffff38
add esp, 0xc
cmp eax, 0xc7
ja 0x4057b0
mov al, byte [edi]
mov ecx, dword [sym.imp.WS2_32.dll_send]
mov esi, edi
test al, al
je 0x405720
mov edi, edi
cmp al, 0xa
je 0x40572a
cmp al, 0xd
je 0x405720
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x405710
mov al, byte [esi]
cmp al, 0xa
je 0x40572a
cmp al, 0xd
jne 0x40572d
inc esi
jmp 0x405720
cmp edi, esi
je 0x40575b
cmp byte [edi], 0x2e
jne 0x405748
push 0
push 1
push 0x411818
push ebx
call ecx
mov ecx, dword [sym.imp.WS2_32.dll_send]
push 0
mov eax, esi
sub eax, edi
push eax
push edi
push ebx
call ecx
test eax, eax
jle 0x4057b0
mov edi, esi
jmp 0x405700
push 0
push 5
push str._r_n._r_n
push ebx
call ecx
push 0
push 0x3a98
push ebx
call fcn.004053e0
add eax, 0xffffff38
add esp, 0xc
cmp eax, 0xc7
ja 0x4057b0
push str.QUIT_r_n
push 0x1388
push ebx
call fcn.004053e0
add esp, 0xc
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004062eb
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.004062eb
mov esp, ebp
pop ebp
ret