Function at 0x4080df
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x437dc6
mov eax, dword fs:[0]
push eax
mov eax, 0x6024
call fcn.0042f880
mov eax, dword [0x44c4c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov dword [ebp - 0x6020], ecx
xor eax, eax
mov dword [ebp - 4], 3
push eax
push eax
push eax
push eax
push str.LogEvents
mov esi, eax
mov dword [ebp - 0x6018], eax
mov dword [ebp - 0x602c], eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ebx, eax
mov dword [ebp - 0x601c], ebx
test ebx, ebx
jne 0x408158
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4083d0
push 0
push 0x50
push str.data.bd_pl.com
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x6024], eax
test eax, eax
jne 0x40817f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4083c9
xor eax, eax
push 0x1ffe
push eax
mov word [ebp - 0x2010], ax
lea eax, [ebp - 0x200e]
push eax
call fcn.0041ed30
add esp, 0xc
lea eax, [ebp - 0x2010]
push dword [ebp + 0xc]
push dword [ebp + 8]
push str.product_serror_s
push eax
call fcn.0041d56f
and dword [ebp - 0x6028], esi
xor eax, eax
push 0x3ffe
push eax
mov word [ebp - 0x6010], ax
lea eax, [ebp - 0x600e]
push eax
call fcn.0041ed30
add esp, 0x14
lea eax, [ebp - 0x6028]
lea edx, [ebp - 0x6010]
lea ecx, [ebp - 0x2010]
push eax
call fcn.00407ed5
add esp, 0xc
test eax, eax
je 0x4083bd
push 0x44288c
lea ecx, [ebp - 0x6014]
call fcn.004025e2
mov byte [ebp - 4], 4
lea eax, [ebp - 0x6010]
cmp dword [ebp + 0x24], 8
push eax
push dword [ebp - 0x6020]
lea eax, [ebp + 0x10]
cmovae eax, dword [ebp + 0x10]
cmp dword [ebp + 0x3c], 8
push edi
push str.00000000_0000_0000_0000_000000000000
push eax
lea eax, [ebp + 0x28]
cmovae eax, dword [ebp + 0x28]
push eax
sub esp, 0x18
mov ecx, esp
push str.apikey
call fcn.00402746
lea ecx, [ebp - 0x6020]
call fcn.0040e9d0
add esp, 0x18
mov byte [ebp - 4], 5
push dword [eax]
lea eax, [ebp - 0x6014]
push str.v1_log__s_AppInstanceId_sBagkey_sTargetUid_sEventType_dEventCode_dProperties_s
push eax
call fcn.004036d3
mov byte [ebp - 4], 4
add esp, 0x24
mov ecx, dword [ebp - 0x6020]
lea ecx, [ecx - 0x10]
call fcn.00404b8d
mov eax, dword [ebp - 0x6014]
cmp dword [eax - 4], 1
jle 0x4082a3
push dword [eax - 0xc]
lea ecx, [ebp - 0x6014]
call fcn.0040299d
mov eax, dword [ebp - 0x6014]
push eax
push str.data.bd_pl.com
push str.Sending_log_event_host__s_request__s
call fcn.00419acb
add esp, 0xc
xor eax, eax
push eax
push eax
push eax
push eax
push dword [ebp - 0x6014]
push 0x442b04
push dword [ebp - 0x6024]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
test edi, edi
jne 0x4082f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x6014]
mov esi, eax
lea ecx, [ecx - 0x10]
call fcn.00404b8d
jmp 0x4083bd
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
cmp eax, 1
je 0x408315
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4083a8
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x4083a8
and dword [ebp - 0x6018], 0
lea eax, [ebp - 0x6018]
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x40839a
mov eax, dword [ebp - 0x6018]
inc eax
push eax
call fcn.0041b520
mov ebx, eax
pop ecx
test ebx, ebx
je 0x408391
mov ecx, dword [ebp - 0x6018]
inc ecx
push ecx
push 0
push ebx
call fcn.0041ed30
add esp, 0xc
lea eax, [ebp - 0x602c]
push eax
push dword [ebp - 0x6018]
push ebx
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x40839a
push ebx
call fcn.0041c95f
cmp dword [ebp - 0x6018], 0
pop ecx
ja 0x408326
jmp 0x4083a2
and dword [ebp - 0x6018], 0
jmp 0x4083a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ebx, dword [ebp - 0x601c]
mov ecx, dword [ebp - 0x6014]
lea ecx, [ecx - 0x10]
call fcn.00404b8d
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x6024]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00404b8d
mov ecx, dword [ebp + 0xc]
lea ecx, [ecx - 0x10]
call fcn.00404b8d
push 0
push 1
lea ecx, [ebp + 0x10]
call fcn.00402cb9
push 0
push 1
lea ecx, [ebp + 0x28]
call fcn.00402cb9
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041c169
mov esp, ebp
pop ebp
ret