Function at 0x1000ca89
Capabilities:
Check internet connectivity via wininet
Connect to http server
Create http request
Get file size
Parse url
Read and send data from client to server
Read file on windows
Send data
Send http request

Disassembly:
push ebp
lea ebp, [esp - 0x74]
sub esp, 0xadc
mov eax, dword [0x100310fc]
xor eax, ebp
mov dword [ebp + 0x70], eax
mov eax, dword [ebp + 0x7c]
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x9bc], eax
mov eax, dword [esi + 8]
xor ebx, ebx
push ebx
mov dword [ebp - 0x9b8], eax
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
mov dword [ebp - 0x9a4], eax
cmp eax, ebx
jne 0x1000d138
push ebx
mov edi, 0x80
push edi
push 3
push ebx
push 1
push closesocket
push 0x10033858
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x9d4], eax
cmp eax, 0xffffffff
je 0x1000d122
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x9b0], eax
mov eax, 0x19000
cmp dword [ebp - 0x9b0], eax
jae 0x1000cb18
mov eax, dword [ebp - 0x9b0]
push eax
mov dword [ebp - 0x9c8], eax
call fcn.10001029
pop ecx
mov dword [ebp - 0x9cc], eax
cmp eax, ebx
je 0x1000d103
push 0x3c
lea eax, [ebp - 0xa18]
push ebx
push eax
call fcn.100162f0
lea eax, [ebp - 0x1a0]
mov dword [ebp - 0xa08], eax
lea eax, [ebp - 0xa0]
mov dword [ebp - 0x9fc], eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x9f4], eax
add esp, 0xc
lea eax, [ebp - 0x9a0]
mov dword [ebp - 0x9ec], eax
lea eax, [ebp - 0xa18]
push eax
push 0x90000000
push ebx
push dword [ebp - 0x9bc]
mov dword [ebp - 0xa18], 0x3c
mov dword [ebp - 0xa04], 0x100
mov dword [ebp - 0x9f8], edi
mov dword [ebp - 0x9f0], edi
mov dword [ebp - 0x9e8], 0x800
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
je 0x1000d0e0
cmp dword [ebp - 0xa0c], 3
jne 0x1000d0cd
push 0x10000000
push ebx
push ebx
xor edi, edi
inc edi
push edi
push str.BugTrap_for_Win32_x86
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x9bc], eax
cmp eax, ebx
je 0x1000d0e0
push 0x1000c1a6
push eax
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
cmp word [ebp - 0xa00], bx
je 0x1000cc12
movzx eax, word [ebp - 0xa00]
mov dword [ebp - 0x9b4], eax
jmp 0x1000cc1c
mov dword [ebp - 0x9b4], 0x50
movsx eax, byte [ebp - 0xa0]
neg eax
sbb eax, eax
lea ecx, [ebp - 0xa0]
and eax, ecx
movsx ecx, byte [ebp - 0x20]
push esi
neg ecx
mov dword [esi + 0x14], edi
mov edi, 0x4000200
push edi
push 3
sbb ecx, ecx
lea edx, [ebp - 0x20]
and ecx, edx
push ecx
push eax
push dword [ebp - 0x9b4]
lea eax, [ebp - 0x1a0]
push eax
push dword [ebp - 0x9bc]
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x9dc], eax
cmp eax, ebx
je 0x1000d0a3
push esi
push edi
push ebx
push ebx
push ebx
lea ecx, [ebp - 0x9a0]
push ecx
push str.POST
push eax
mov dword [esi + 0x14], 2
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp - 0x9c4], eax
cmp eax, ebx
je 0x1000d079
push 1
push 0x1000
lea ecx, [ebp - 0xa68]
call fcn.1000129a
lea eax, [ebp - 0xa68]
mov dword [ebp - 0x9ac], eax
lea eax, [ebp - 0xa60]
push str.__BUGTRAP_7A1D6378_1294_491B_996C_37D4FF91D184_r_nContent_Disposition:_form_data__name_protocolSignature__r_nContent_Type:_text_plain__charset_utf_8__r_nContent_Transfer_Encoding:_8bit_r_n_r_n
lea ecx, [ebp - 0x9ac]
mov dword [ebp - 0x9a8], eax
call fcn.10004772
mov ecx, dword [ebp - 0x9a8]
mov eax, dword [ecx]
push 4
push str.BT01Error_Report
call dword [eax + 0xc]
mov edi, 0x10029410
push edi
lea ecx, [ebp - 0x9ac]
call fcn.10004772
push str.__BUGTRAP_7A1D6378_1294_491B_996C_37D4FF91D184_r_nContent_Disposition:_form_data__name_messageType__r_nContent_Type:_text_plain__charset_utf_8__r_nContent_Transfer_Encoding:_8bit_r_n_r_n
lea ecx, [ebp - 0x9ac]
call fcn.10004772
push 0xa
push 0x10
lea eax, [ebp + 0x60]
push eax
push 1
call fcn.1001647c
add esp, 0x10
lea eax, [ebp + 0x60]
push eax
lea ecx, [ebp - 0x9ac]
call fcn.10004772
push edi
lea ecx, [ebp - 0x9ac]
call fcn.10004772
push str.__BUGTRAP_7A1D6378_1294_491B_996C_37D4FF91D184_r_nContent_Disposition:_form_data__name_messageFlags__r_nContent_Type:_text_plain__charset_utf_8__r_nContent_Transfer_Encoding:_8bit_r_n_r_n
lea ecx, [ebp - 0x9ac]
call fcn.10004772
push 0xa
push 0x10
lea eax, [ebp + 0x60]
push eax
push ebx
call fcn.1001647c
add esp, 0x10
lea eax, [ebp + 0x60]
push eax
lea ecx, [ebp - 0x9ac]
call fcn.10004772
push edi
lea ecx, [ebp - 0x9ac]
call fcn.10004772
push str.__BUGTRAP_7A1D6378_1294_491B_996C_37D4FF91D184_r_nContent_Disposition:_form_data__name_appName__r_nContent_Type:_text_plain__charset_utf_8__r_nContent_Transfer_Encoding:_8bit_r_n_r_n
lea ecx, [ebp - 0x9ac]
call fcn.10004772
push 0x10032e08
lea ecx, [ebp - 0x9ac]
call fcn.1000e52a
push edi
lea ecx, [ebp - 0x9ac]
call fcn.10004772
push str.__BUGTRAP_7A1D6378_1294_491B_996C_37D4FF91D184_r_nContent_Disposition:_form_data__name_appVersion__r_nContent_Type:_text_plain__charset_utf_8__r_nContent_Transfer_Encoding:_8bit_r_n_r_n
lea ecx, [ebp - 0x9ac]
call fcn.10004772
push 0x10032f10
lea ecx, [ebp - 0x9ac]
call fcn.1000e52a
push edi
lea ecx, [ebp - 0x9ac]
call fcn.10004772
push str.__BUGTRAP_7A1D6378_1294_491B_996C_37D4FF91D184_r_nContent_Disposition:_form_data__name_reportFileExtension__r_nContent_Type:_text_plain__charset_utf_8__r_nContent_Transfer_Encoding:_8bit_r_n_r_n
lea ecx, [ebp - 0x9ac]
call fcn.10004772
call fcn.10006941
push eax
lea ecx, [ebp - 0x9ac]
call fcn.1000e52a
push edi
lea ecx, [ebp - 0x9ac]
call fcn.10004772
push str.__BUGTRAP_7A1D6378_1294_491B_996C_37D4FF91D184_r_nContent_Disposition:_form_data__name_notificationEMail__r_nContent_Type:_text_plain__charset_utf_8__r_nContent_Transfer_Encoding:_8bit_r_n_r_n
lea ecx, [ebp - 0x9ac]
call fcn.10004772
push 0x10033330
lea ecx, [ebp - 0x9ac]
call fcn.1000e52a
push edi
lea ecx, [ebp - 0x9ac]
call fcn.10004772
push str.__BUGTRAP_7A1D6378_1294_491B_996C_37D4FF91D184_r_nContent_Disposition:_form_data__name_reportData___filename_report.dat__r_nContent_Type:_application_octet_stream_r_nContent_Transfer_Encoding:_binary_r_n_r_n
lea ecx, [ebp - 0x9ac]
call fcn.10004772
mov eax, dword [ebp - 0xa4c]
mov dword [ebp - 0x9c0], eax
cmp eax, ebx
je 0x1000d048
mov edi, dword [ebp - 0xa58]
push 0x28
lea eax, [ebp - 0xa40]
push ebx
push eax
call fcn.100162f0
add esp, 0xc
push 0x58
pop eax
mov dword [ebp - 0xa30], eax
mov dword [ebp - 0xa34], eax
mov eax, dword [ebp - 0x9b0]
lea eax, [edi + eax + 0x36]
mov dword [ebp - 0xa24], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0xa40], 0x28
mov dword [ebp - 0xa38], str.Content_Type:_multipart_form_data__boundaryBUGTRAP_7A1D6378_1294_491B_996C_37D4FF91D184
mov dword [ebp - 0x9b4], eax
cmp dword [ebp - 0x9b8], ebx
je 0x1000ceb8
push ebx
push ebx
push 0x8001
push dword [ebp - 0x9b8]
call dword [sym.imp.USER32.dll_PostMessageA]
push dword [ebp - 0x9b4]
mov dword [esi + 0x14], 3
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0x1c8
push ebx
push ebx
lea eax, [ebp - 0xa40]
push eax
push dword [ebp - 0x9c4]
call dword [sym.imp.WININET.dll_HttpSendRequestExA]
test eax, eax
jne 0x1000cefc
call fcn.1000c1e3
mov dword [ebp - 0x9a4], eax
cmp eax, ebx
jne 0x1000d059
cmp dword [ebp - 0x9b8], ebx
je 0x1000cf17
push ebx
push ebx
push 0x8002
push dword [ebp - 0x9b8]
call dword [sym.imp.USER32.dll_PostMessageA]
mov eax, dword [ebp - 0x9c0]
mov dword [esi + 0x14], 4
mov dword [ebp - 0x9d0], ebx
mov dword [ebp - 0x9b0], eax
push dword [ebp - 0x9b4]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
cmp edi, ebx
jbe 0x1000cf8f
lea eax, [ebp - 0x9d8]
push eax
push edi
push dword [ebp - 0x9b0]
mov dword [ebp - 0x9d8], ebx
push dword [ebp - 0x9c4]
call dword [sym.imp.WININET.dll_InternetWriteFile]
test eax, eax
jne 0x1000cf73
call fcn.1000c1e3
mov dword [ebp - 0x9a4], eax
cmp eax, ebx
jne 0x1000cf85
mov eax, dword [ebp - 0x9d8]
add dword [ebp - 0x9b0], eax
sub edi, eax
jne 0x1000cf40
jmp 0x1000cf8f
mov dword [ebp - 0x9d0], 1
cmp dword [ebp - 0x9d0], ebx
jne 0x1000cff2
push ebx
lea eax, [ebp - 0x9c0]
push eax
push dword [ebp - 0x9c8]
mov dword [ebp - 0x9c0], ebx
push dword [ebp - 0x9cc]
push dword [ebp - 0x9d4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1000cfd6
mov edi, dword [ebp - 0x9c0]
cmp edi, ebx
je 0x1000cfd6
mov eax, dword [ebp - 0x9cc]
jmp 0x1000cf2a
push 0x36
mov dword [ebp - 0x9d0], 1
mov dword [ebp - 0x9b0], str._r_n__BUGTRAP_7A1D6378_1294_491B_996C_37D4FF91D184___r_n_r_n
pop edi
jmp 0x1000cf30
cmp dword [ebp - 0x9a4], ebx
jne 0x1000d059
cmp dword [ebp - 0x9b8], ebx
je 0x1000d015
push ebx
push ebx
push 0x8003
push dword [ebp - 0x9b8]
call dword [sym.imp.USER32.dll_PostMessageA]
push dword [ebp - 0x9b4]
mov dword [esi + 0x14], 5
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push ebx
push ebx
push ebx
push dword [ebp - 0x9c4]
call dword [sym.imp.WININET.dll_HttpEndRequestA]
test eax, eax
jne 0x1000d059
call fcn.1000c1e3
mov dword [ebp - 0x9a4], eax
jmp 0x1000d059
push 8
pop eax
push eax
mov ecx, esi
mov dword [ebp - 0x9a4], eax
call fcn.1000c034
push dword [ebp - 0x9c4]
mov dword [esi + 0x14], 7
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [ebp - 0xa44]
call fcn.1000121a
jmp 0x1000d08e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
mov dword [ebp - 0x9a4], eax
call fcn.1000c0cb
pop ecx
pop ecx
push dword [ebp - 0x9dc]
mov dword [esi + 0x14], 7
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x1000d0b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
mov dword [ebp - 0x9a4], eax
call fcn.1000c0cb
pop ecx
pop ecx
push dword [ebp - 0x9bc]
mov dword [esi + 0x14], 7
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x1000d0f5
push 0x43
pop eax
push eax
mov ecx, esi
mov dword [ebp - 0x9a4], eax
call fcn.1000c034
jmp 0x1000d0f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
mov dword [ebp - 0x9a4], eax
call fcn.1000c0cb
pop ecx
pop ecx
push dword [ebp - 0x9cc]
call fcn.10016394
pop ecx
jmp 0x1000d114
push 8
pop eax
push eax
mov ecx, esi
mov dword [ebp - 0x9a4], eax
call fcn.1000c034
push dword [ebp - 0x9d4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1000d141
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
mov dword [ebp - 0x9a4], eax
call fcn.1000c034
jmp 0x1000d141
push eax
push esi
call fcn.1000c0cb
pop ecx
pop ecx
mov ecx, dword [ebp + 0x70]
mov eax, dword [ebp - 0x9a4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100162d3
add ebp, 0x74
leave
ret