Function at 0x489344
Capabilities:
Read and send data from client to server
Read file on windows
Send data

Disassembly:
push 0x42c
mov eax, 0x49cf41
call fcn.00497265
mov ebx, ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x41c], eax
mov eax, dword [0x4cb014]
xor edi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x428], eax
lea eax, [ebp - 0x428]
mov byte [ebp - 4], 1
push eax
push ecx
lea eax, [ebp + 0xc]
mov ecx, esp
push eax
call fcn.0045e6a5
mov ecx, ebx
call fcn.0048871c
test eax, eax
jne 0x4893ad
push 1
push edi
push ecx
mov ecx, esp
push str.Error_formatting_attachment_part_header.
call fcn.0045f630
mov ecx, dword [ebx + 0x14]
call fcn.004620ac
jmp 0x489638
mov dword [ebp - 0x438], edi
mov dword [ebp - 0x434], edi
mov dword [ebp - 0x430], edi
push dword [ebp - 0x428]
lea ecx, [ebp - 0x438]
mov byte [ebp - 4], 2
call fcn.0046b68b
mov esi, eax
test esi, esi
jne 0x4893e7
push 1
push edi
push ecx
mov ecx, esp
push str.Error_converting_attachment_part_header_to_ASCII.
jmp 0x489450
lea eax, [ebp - 0x420]
mov dword [ebp - 0x420], edi
push eax
push esi
call sub.MSVCR120.dll_strlen
pop ecx
push eax
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.WININET.dll_InternetWriteFile]
test eax, eax
jne 0x48941a
push 1
push edi
push ecx
mov ecx, esp
push str.Error_uploading_attachment_part_header.
jmp 0x489450
push dword [ebp - 0x420]
mov ecx, ebx
call fcn.004892d5
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebx + 0xc]
call fcn.00489980
mov eax, dword [ebp - 0x414]
cmp eax, dword [ebx + 0xc]
jne 0x489462
push 1
push edi
push ecx
mov ecx, esp
push str.Error_searching_for_attachment_part_name.
call fcn.0045f630
mov ecx, dword [ebx + 0x14]
call fcn.004620ac
jmp 0x489629
push edi
lea ecx, [eax + 0x14]
call fcn.0046023d
push eax
lea ecx, [ebp - 0x414]
call fcn.0045f630
push edi
push edi
push 3
push edi
push 1
push connect
push dword [ebp - 0x414]
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4894b7
push 1
push edi
push ecx
mov ecx, esp
push str.Error_opening_attachment_file.
call fcn.0045f630
mov ecx, dword [ebx + 0x14]
call fcn.004620ac
jmp 0x48961e
mov dword [ebp - 0x42c], edi
jmp 0x489522
push edi
lea eax, [ebp - 0x42c]
push eax
push 0x400
lea eax, [ebp - 0x410]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4895ff
cmp dword [ebp - 0x42c], 0
je 0x489543
lea eax, [ebp - 0x418]
mov dword [ebp - 0x418], edi
push eax
push dword [ebp - 0x42c]
lea eax, [ebp - 0x410]
push eax
push dword [ebp - 0x41c]
call dword [sym.imp.WININET.dll_InternetWriteFile]
test eax, eax
je 0x489533
push dword [ebp - 0x418]
mov ecx, ebx
call fcn.004892d5
mov ecx, dword [ebx + 0x14]
call fcn.00461fed
test al, al
je 0x4894bf
jmp 0x48961e
push 1
push edi
push ecx
mov ecx, esp
push str.Error_uploading_attachment_part_data.
jmp 0x4894a5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4cb014]
mov dword [ebp - 0x418], eax
lea eax, [ebp - 0x418]
mov byte [ebp - 4], 4
push eax
push ecx
lea eax, [ebp + 0xc]
mov ecx, esp
push eax
call fcn.0045e6a5
mov ecx, ebx
call fcn.004886ed
test eax, eax
jne 0x489584
push 1
push edi
push ecx
mov ecx, esp
push str.Error_formatting_attachment_part_footer.
jmp 0x4895d3
push dword [ebp - 0x418]
lea ecx, [ebp - 0x438]
call fcn.0046b68b
mov esi, eax
test esi, esi
jne 0x4895a8
push 1
push edi
push ecx
mov ecx, esp
push str.Error_converting_attachment_part_footer_to_ASCII.
jmp 0x4895d3
lea eax, [ebp - 0x420]
push eax
push esi
call sub.MSVCR120.dll_strlen
pop ecx
push eax
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.WININET.dll_InternetWriteFile]
test eax, eax
jne 0x4895e2
push 1
push edi
push ecx
mov ecx, esp
push str.Error_uploading_attachment_part_footer.
call fcn.0045f630
mov ecx, dword [ebx + 0x14]
call fcn.004620ac
jmp 0x4895f2
push dword [ebp - 0x420]
mov ecx, ebx
call fcn.004892d5
xor edi, edi
inc edi
lea ecx, [ebp - 0x418]
call fcn.0045e73f
jmp 0x48961e
push 1
push edi
push ecx
mov ecx, esp
push str.Error_reading_data_from_attachment_file.
call fcn.0045f630
mov ecx, dword [ebx + 0x14]
call fcn.004620ac
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x414]
call fcn.0045e73f
lea ecx, [ebp - 0x438]
mov byte [ebp - 4], 1
call fcn.0045f6ac
lea ecx, [ebp - 0x428]
call fcn.0045e73f
lea ecx, [ebp + 0xc]
call fcn.0045e73f
mov eax, edi
call fcn.00497214
ret 8