Function at 0x42af10
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Set http header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x555eb4
mov eax, dword fs:[0]
push eax
mov eax, 0x3534
call fcn.004d68c0
mov eax, dword [0x5ad6f0]
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 eax, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x3524], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x3518], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x3508], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x3528], eax
mov dword [ebp - 4], 0
mov edi, 0x80004005
test esi, esi
jne 0x42af83
mov edi, 0x80070057
jmp 0x42b595
cmp dword [ebp + 0x10], 0
jne 0x42af93
mov edi, 0x80070057
jmp 0x42b595
mov eax, dword [ebp + 8]
test eax, eax
je 0x42afa3
cmp dword [eax], 0
jne 0x42b595
lea ecx, [ebp - 0x34fc]
call fcn.0042b5e0
push 4
push dword [0x5672a0]
mov eax, 0x50
mov dword [ebp - 0x10ac], 2
mov word [ebp - 0x10b0], ax
lea eax, [ebp - 0x34fc]
push 0x21
push eax
mov dword [ebp - 0x10a8], 4
call fcn.0051d8b1
push eax
call fcn.00412700
add esp, 0x14
lea ecx, [ebp - 0x34fc]
call fcn.0042b5e0
lea ecx, [ebp - 0x34fc]
call fcn.0042b5e0
push esi
lea ecx, [ebp - 0x34fc]
call fcn.0042ed30
test eax, eax
jne 0x42b01d
mov edi, 0x80070057
jmp 0x42b595
mov esi, dword [ebp - 0x10ac]
cmp esi, 2
je 0x42b037
cmp esi, 3
je 0x42b037
mov edi, 0x80070057
jmp 0x42b595
movzx edi, word [ebp - 0x10b0]
call fcn.00406530
mov ecx, eax
test ecx, ecx
je 0x42b5c9
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x3520], eax
lea ecx, [ebp - 0x30b4]
mov byte [ebp - 4], 1
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x42b070
sub ecx, edx
lea eax, [ebp - 0x30b4]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x3520]
call fcn.0040adc0
lea ecx, [ebp - 0x20b2]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x42b0a0
sub ecx, edx
lea eax, [ebp - 0x20b2]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x3520]
call fcn.00427ac0
mov dword [ebp - 0x353c], 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ebx, eax
mov dword [ebp - 0x3538], ebx
test ebx, ebx
jne 0x42b123
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x42b0fd
movzx edi, di
or edi, 0x80070000
mov edx, dword [ebp - 0x3520]
or eax, 0xffffffff
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x42b595
mov ecx, dword [edx]
push edx
jmp 0x42b590
mov dword [ebp - 0x3534], 0
push 0
push edi
lea eax, [ebp - 0x34ba]
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0x3530], ecx
test ecx, ecx
jne 0x42b168
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x42b15f
movzx edi, di
or edi, 0x80070000
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x42b0fd
mov dword [ebp - 0x3504], 0
mov dword [ebp - 0x3500], 0
xor edx, edx
mov byte [ebp - 4], 4
cmp esi, 3
mov eax, 0x800000
mov esi, dword [ebp - 0x3520]
cmovne eax, edx
push eax
push edx
push edx
push dword [ebp - 0x3528]
push esi
push dword [ebp - 0x3508]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x3500], eax
test eax, eax
jne 0x42b1d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x42b53c
movzx edi, di
or edi, 0x80070000
jmp 0x42b53c
push dword [ebp + 0x34]
push dword [ebp + 0x30]
push dword [ebp + 0x2c]
push dword [ebp + 0x28]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
push 4
lea eax, [ebp - 0x3540]
mov dword [ebp - 0x3540], 8
push eax
push 0x3f
push dword [ebp - 0x3500]
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp - 0x32b8]
push eax
call edi
test eax, eax
jle 0x42b246
lea eax, [ebp - 0x31b6]
push eax
call edi
test eax, eax
jle 0x42b246
push 0
lea eax, [ebp - 0x31b6]
push eax
lea eax, [ebp - 0x32b8]
push eax
push 1
push 0
push dword [ebp - 0x3500]
call dword [sym.imp.WINHTTP.dll_WinHttpSetCredentials]
mov ebx, dword [ebp - 0x3524]
test ebx, ebx
je 0x42b266
push ebx
call edi
push 0x10000000
push eax
push ebx
push dword [ebp - 0x3500]
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
lea eax, [ebp - 0x3504]
push eax
mov eax, dword [ebp + 0x1c]
push eax
push eax
push dword [ebp - 0x3518]
push 0
push 0
push dword [ebp - 0x3500]
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov edi, eax
test edi, edi
js 0x42b53c
push 0
push dword [ebp - 0x3500]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x42b1b4
push 0x80
lea eax, [ebp - 0x90]
xorps xmm0, xmm0
push 0
push eax
movlpd qword [ebp - 0x3514], xmm0
call fcn.00513d10
add esp, 0xc
mov dword [ebp - 0x3508], 0x7f
lea eax, [ebp - 0x3508]
push 0
push eax
lea eax, [ebp - 0x90]
push eax
push 0
push 5
push dword [ebp - 0x3500]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
lea eax, [ebp - 0x351c]
xorps xmm0, xmm0
push eax
push 0
lea eax, [ebp - 0x90]
movlpd qword [ebp - 0x351c], xmm0
push eax
call dword [sym.imp.SHLWAPI.dll_StrToInt64ExW]
mov edx, dword [ebp - 0x3518]
mov dword [ebp - 0x3524], edx
test edx, edx
jl 0x42b34c
mov ebx, dword [ebp - 0x351c]
mov dword [ebp - 0x3528], ebx
jg 0x42b336
test ebx, ebx
je 0x42b34c
mov eax, dword [ebp + 0x10]
push edx
push ebx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov edi, eax
test edi, edi
jns 0x42b364
jmp 0x42b53c
mov eax, dword [ebp - 0x3510]
mov dword [ebp - 0x3524], eax
mov eax, dword [ebp - 0x3514]
mov dword [ebp - 0x3528], eax
mov eax, dword [ebp + 0x10]
lea edx, [ebp - 0x350c]
push edx
xorps xmm0, xmm0
push 0
movlpd qword [ebp - 0x351c], xmm0
push dword [ebp - 0x3518]
movlpd qword [ebp - 0x350c], xmm0
push dword [ebp - 0x351c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov edi, eax
test edi, edi
js 0x42b53c
cmp dword [ebp - 0x350c], 0
jne 0x42b53c
cmp dword [ebp - 0x3508], 0
jne 0x42b53c
xorps xmm0, xmm0
movlpd qword [ebp - 0x350c], xmm0
mov eax, dword [ebp - 0x3508]
mov ebx, dword [ebp - 0x350c]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x3510], eax
test ecx, ecx
je 0x42b3e6
cmp dword [ecx], 0
jne 0x42b4a1
lea eax, [ebp - 0x3518]
mov dword [ebp - 0x3518], 0
push eax
push dword [ebp - 0x3500]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x42b4a8
cmp dword [ebp - 0x3518], 0
jbe 0x42b4a8
push 0x1000
lea eax, [ebp - 0x1090]
push 0
push eax
call fcn.00513d10
add esp, 0xc
lea eax, [ebp - 0x3518]
push eax
push 0x1000
lea eax, [ebp - 0x1090]
push eax
push dword [ebp - 0x3500]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x42b4a8
mov edx, dword [ebp - 0x3518]
test edx, edx
je 0x42b4a8
mov eax, dword [ebp + 0x10]
lea edi, [ebp - 0x3508]
push edi
push edx
mov dword [ebp - 0x3508], 0
lea edx, [ebp - 0x1090]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x10]
mov edi, eax
test edi, edi
js 0x42b4c5
mov eax, dword [ebp - 0x3508]
cmp eax, dword [ebp - 0x3518]
jne 0x42b4c5
add ebx, eax
mov eax, dword [ebp - 0x3510]
adc eax, 0
jmp 0x42b3d0
mov edi, 0x800704c7
jmp 0x42b4cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [ebp - 0x3510]
test edi, edi
jle 0x42b4cb
movzx edi, di
or edi, 0x80070000
jmp 0x42b4cb
mov eax, dword [ebp - 0x3510]
mov ecx, dword [ebp - 0x3528]
mov edx, dword [ebp - 0x3524]
cmp ebx, ecx
jne 0x42b4df
cmp eax, edx
je 0x42b4e7
test ecx, ecx
jne 0x42b4eb
test edx, edx
jne 0x42b4eb
xor edi, edi
jmp 0x42b50b
mov eax, dword [ebp + 0x10]
xorps xmm0, xmm0
movlpd qword [ebp - 0x352c], xmm0
push dword [ebp - 0x3528]
push dword [ebp - 0x352c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
mov eax, dword [ebp + 0x10]
lea edx, [ebp - 0x352c]
push edx
xorps xmm0, xmm0
push 0
movlpd qword [ebp - 0x350c], xmm0
push dword [ebp - 0x3508]
movlpd qword [ebp - 0x352c], xmm0
push dword [ebp - 0x350c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x3500]
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test eax, eax
je 0x42b559
push eax
call ebx
mov dword [ebp - 0x3500], 0
mov eax, dword [ebp - 0x3504]
test eax, eax
je 0x42b569
push eax
call fcn.00445e4d
push dword [ebp - 0x3530]
call ebx
push dword [ebp - 0x3538]
call ebx
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x42b595
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x42b5a9
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, edi
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.004d684f
mov esp, ebp
pop ebp
ret 0x30
push 0x80004005
call fcn.00406210
int3