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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x40c008]
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 0x4041e1
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 0x4041e8
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 0x40428f
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 0x40428f
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 0x404285
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 0x404266
test dx, dx
je 0x404262
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x404266
add ecx, 4
add eax, 4
test dx, dx
jne 0x404240
xor eax, eax
jmp 0x40426b
sbb eax, eax
or eax, 1
test eax, eax
je 0x40427a
inc esi
add edi, 0x4c
cmp esi, dword [ebp - 0xc]
jb 0x404236
jmp 0x404285
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 0x4042c0
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.00406d31
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 0x40cbc4
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 0x40432d
push eax
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_C_error_int_]
mov ecx, dword [0x40c570]
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 0x404362
mov ecx, dword [ebp - 0x2c]
add esi, eax
sub edi, eax
cmp esi, 4
jl 0x404343
jmp 0x404369
mov dword [ebp - 0xc], 0xffffffff
mov ecx, dword [0x40c570]
xor esi, esi
mov dword [ebp - 0x2c], ecx
mov edi, 8
nop dword [eax]
push 0
push edi
lea eax, [esi + 0x409490]
push eax
push ecx
call ebx
cmp eax, 0xffffffff
je 0x4043a0
mov ecx, dword [ebp - 0x2c]
add esi, eax
sub edi, eax
cmp esi, 8
jl 0x404380
jmp 0x4043a7
mov dword [ebp - 0xc], 0xffffffff
mov ecx, dword [0x40c570]
xor esi, esi
mov dword [ebp - 0x2c], ecx
mov edi, 1
push 0
push edi
lea eax, [esi + 0x4093ad]
push eax
push ecx
call ebx
cmp eax, 0xffffffff
je 0x4043d7
mov ecx, dword [ebp - 0x2c]
add esi, eax
sub edi, eax
cmp esi, 1
jl 0x4043b7
jmp 0x4043de
mov dword [ebp - 0xc], 0xffffffff
mov eax, dword [ebp - 0x10]
xor esi, esi
mov ecx, dword [0x40c570]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x38], ecx
test eax, eax
jle 0x40441b
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 0x404414
mov ecx, dword [ebp - 0x38]
add esi, eax
sub edi, eax
cmp esi, dword [ebp - 0x2c]
jl 0x4043f5
jmp 0x40441b
mov dword [ebp - 0xc], 0xffffffff
push 0x40cbc4
call dword [sym.imp.MSVCP140.dll__Mtx_unlock]
push dword [ebp - 0x34]
call fcn.00406d5d
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.00406a94
mov esp, ebp
pop ebp
ret