Function at 0x4040a0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x40b008]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push 0x10
mov esi, ecx
call dword [sym.imp.gdiplus.dll_GdipAlloc]
mov ebx, eax
mov dword [ebp - 0x30], ebx
test ebx, ebx
je 0x4040f1
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
xorps xmm0, xmm0
push 0
movups xmmword [ebx], xmm0
push esi
mov dword [ebx], vtable.Gdiplus::Bitmap.0
call dword [sym.imp.gdiplus.dll_GdipCreateBitmapFromHBITMAP]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x10]
mov dword [ebx + 4], eax
jmp 0x4040f8
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0xc], 0
push eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0x10], 0
push eax
call dword [sym.imp.gdiplus.dll_GdipGetImageEncodersSize]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40419f
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40419f
push ebx
push dword [ebp - 0x10]
push dword [ebp - 0xc]
call dword [sym.imp.gdiplus.dll_GdipGetImageEncoders]
xor esi, esi
cmp dword [ebp - 0xc], esi
jbe 0x404195
lea edi, [ebx + 0x30]
mov ecx, dword [edi]
mov eax, str.image_jpeg
nop dword [eax]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x404176
test dx, dx
je 0x404172
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x404176
add ecx, 4
add eax, 4
test dx, dx
jne 0x404150
xor eax, eax
jmp 0x40417b
sbb eax, eax
or eax, 1
test eax, eax
je 0x40418a
inc esi
add edi, 0x4c
cmp esi, dword [ebp - 0xc]
jb 0x404146
jmp 0x404195
imul eax, esi, 0x4c
movups xmm0, xmmword [eax + ebx]
movups xmmword [ebp - 0x20], xmm0
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0
push eax
push 1
push 0
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov esi, dword [ebp - 0x30]
lea eax, [ebp - 0x20]
push 0
push eax
push dword [ebp - 0x28]
push dword [esi + 4]
call dword [sym.imp.gdiplus.dll_GdipSaveImageToStream]
test eax, eax
je 0x4041d0
mov dword [esi + 8], eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0
push eax
push dword [ebp - 0x28]
call dword [sym.imp.ole32.dll_GetHGlobalFromStream]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov esi, eax
push esi
call fcn.00406811
add esp, 4
mov ebx, eax
mov dword [ebp - 0x34], ebx
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push esi
push eax
push ebx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push 0x40bbc4
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], 0
call dword [sym.imp.MSVCP140.dll__Mtx_lock]
add esp, 4
test eax, eax
je 0x40423d
push eax
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_C_error_int_]
mov ecx, dword [0x40b570]
xor esi, esi
mov ebx, dword [sym.imp.WS2_32.dll_send]
mov edi, 4
mov dword [ebp - 0x2c], ecx
push 0
push edi
lea eax, [ebp - 0x10]
add eax, esi
push eax
push ecx
call ebx
cmp eax, 0xffffffff
je 0x404272
mov ecx, dword [ebp - 0x2c]
add esi, eax
sub edi, eax
cmp esi, 4
jl 0x404253
jmp 0x404279
mov dword [ebp - 0xc], 0xffffffff
mov ecx, dword [0x40b570]
xor esi, esi
mov dword [ebp - 0x2c], ecx
mov edi, 8
nop dword [eax]
push 0
push edi
lea eax, [esi + 0x408430]
push eax
push ecx
call ebx
cmp eax, 0xffffffff
je 0x4042b0
mov ecx, dword [ebp - 0x2c]
add esi, eax
sub edi, eax
cmp esi, 8
jl 0x404290
jmp 0x4042b7
mov dword [ebp - 0xc], 0xffffffff
mov ecx, dword [0x40b570]
xor esi, esi
mov dword [ebp - 0x2c], ecx
mov edi, 1
push 0
push edi
lea eax, [esi + 0x408384]
push eax
push ecx
call ebx
cmp eax, 0xffffffff
je 0x4042e7
mov ecx, dword [ebp - 0x2c]
add esi, eax
sub edi, eax
cmp esi, 1
jl 0x4042c7
jmp 0x4042ee
mov dword [ebp - 0xc], 0xffffffff
mov eax, dword [ebp - 0x10]
xor esi, esi
mov ecx, dword [0x40b570]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x38], ecx
test eax, eax
jle 0x40432b
mov edi, eax
mov eax, dword [ebp - 0x34]
push 0
push edi
add eax, esi
push eax
push ecx
call ebx
cmp eax, 0xffffffff
je 0x404324
mov ecx, dword [ebp - 0x38]
add esi, eax
sub edi, eax
cmp esi, dword [ebp - 0x2c]
jl 0x404305
jmp 0x40432b
mov dword [ebp - 0xc], 0xffffffff
push 0x40bbc4
call dword [sym.imp.MSVCP140.dll__Mtx_unlock]
push dword [ebp - 0x34]
call fcn.0040683d
mov edx, dword [ebp - 0x28]
add esp, 8
mov esi, dword [edx]
push edx
call dword [esi + 8]
mov eax, dword [ebp - 0x30]
mov ecx, eax
push 1
mov edx, dword [eax]
call dword [edx]
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00406574
mov esp, ebp
pop ebp
ret