Function at 0x4047a0
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 [0x413038]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, edx
push ecx
lea eax, [ebp - 0x408]
mov esi, ecx
push eax
mov edx, str.From
mov ecx, edi
call fcn.00404490
add esp, 8
test eax, eax
jne 0x404a87
push ecx
lea eax, [ebp - 0x208]
push eax
mov edx, 0x410f5c
mov ecx, edi
call fcn.00404490
add esp, 8
test eax, eax
jne 0x404a87
mov cl, byte [ebp - 0x208]
lea eax, [ebp - 0x208]
test cl, cl
je 0x404a87
lea esp, [esp]
cmp cl, 0x40
je 0x404822
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x404810
jmp 0x404a87
cmp byte [eax], 0
je 0x404a87
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 0x404a87
push 0x10
push esi
push ebx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x404a80
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 0x404a80
push 0
push 0x3a98
push ebx
call fcn.004046b0
add eax, 0xffffff38
add esp, 0xc
cmp eax, 0xc7
ja 0x404a80
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.004046b0
add esp, 0x10
cmp eax, 0xc8
jl 0x4048ff
cmp eax, 0x12b
jle 0x404939
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.004046b0
add eax, 0xffffff38
add esp, 0x10
cmp eax, 0x63
ja 0x404a80
mov edx, str.MAIL_FROM:__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.004046b0
add eax, 0xffffff38
add esp, 0x10
cmp eax, 0x63
ja 0x404a80
mov edx, str.RCPT_TO:__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.004046b0
add eax, 0xffffff38
add esp, 0x10
cmp eax, 0x63
ja 0x404a80
push str.DATA_r_n
push 0x2710
push ebx
call fcn.004046b0
add eax, 0xffffff38
add esp, 0xc
cmp eax, 0xc7
ja 0x404a80
mov al, byte [edi]
mov ecx, dword [sym.imp.WS2_32.dll_send]
mov esi, edi
test al, al
je 0x4049f0
mov edi, edi
cmp al, 0xa
je 0x4049fa
cmp al, 0xd
je 0x4049f0
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x4049e0
mov al, byte [esi]
cmp al, 0xa
je 0x4049fa
cmp al, 0xd
jne 0x4049fd
inc esi
jmp 0x4049f0
cmp edi, esi
je 0x404a2b
cmp byte [edi], 0x2e
jne 0x404a18
push 0
push 1
push 0x4109b4
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 0x404a80
mov edi, esi
jmp 0x4049d0
push 0
push 5
push str._r_n._r_n
push ebx
call ecx
push 0
push 0x3a98
push ebx
call fcn.004046b0
add eax, 0xffffff38
add esp, 0xc
cmp eax, 0xc7
ja 0x404a80
push str.QUIT_r_n
push 0x1388
push ebx
call fcn.004046b0
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.0040541b
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.0040541b
mov esp, ebp
pop ebp
ret