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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x1068
call fcn.0041bc10
lea edi, [ebp - 0x18]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x28], ecx
mov dword [edi - 4], esp
or dword [edi + 8], 0xffffffff
mov dword [edi + 4], 0x41b5a0
mov esi, dword fs:[0]
mov dword [edi], esi
mov dword fs:[0], edi
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x58], eax
push 0
push 0
push 0
push 0
push 0
call sub.winhttp.dll_WinHttpOpen
test eax, eax
je 0x404377
push 4
push 0x42ba40
push 0x54
mov dword [ebp - 0x24], eax
push eax
call sub.winhttp.dll_WinHttpSetOption
lea eax, [0x4274f4]
lea edx, [ebp - 0x1074]
lea esi, [ebp - 0x1074]
mov dword [edx], eax
mov ecx, dword [edx]
mov dword [edx], 0xb20c54f3
mov edx, dword [esi]
call fcn.0040293e
and dword [esi + 8], 0
xorps xmm0, xmm0
xor ecx, ecx
movsd qword [esi], xmm0
cmp ecx, 0xb
ja 0x404134
mov edx, dword [ecx + 0x42ba44]
xor edx, dword [eax + ecx]
mov dword [ebp + ecx - 0x1074], edx
add ecx, 4
jmp 0x40411a
movzx ecx, byte [eax + 0xe]
movzx eax, word [eax + 0xc]
lea esi, [ebp - 0x1074]
or dword [ebp - 0x10], 0xffffffff
lea edx, [ebp - 0x4c]
lea edi, [ebp - 0x68]
xor eax, 0x53d4
xor cl, 0xca
mov word [esi + 0xc], ax
mov byte [esi + 0xe], cl
mov ecx, edi
movsd xmm0, qword [esi]
movsd xmm1, qword [esi + 7]
movsd qword [edx], xmm0
movsd qword [edx + 7], xmm1
push 0xf
call fcn.00409c4b
pop eax
mov edx, dword [edi + 4]
mov eax, dword [edi + 8]
mov dword [ebp - 0x10], 1
mov ecx, esi
mov dword [ebp - 0x30], edx
push eax
call fcn.0040405b
pop eax
mov eax, dword [ebp - 0x1070]
mov dword [ebp - 0x10], 3
push 0
push 0x1bb
mov dword [ebp - 0x20], eax
push eax
push dword [ebp - 0x24]
call sub.winhttp.dll_WinHttpConnect
mov ecx, dword [ebp - 0x1074]
mov edx, dword [ebp - 0x20]
mov esi, eax
call fcn.004133b5
test esi, esi
je 0x4043c6
lea eax, [ebp - 0x5c]
lea ecx, [ebp - 0x54]
lea edx, [ebp - 0x1074]
mov dword [ebp - 0x2c], esi
mov dword [ecx], eax
xor eax, eax
mov dword [edx], 0x42ba54
mov dword [ecx + 4], fcn.0040a601
inc eax
mov dword [edx + 4], eax
and dword [edx + 0x10], 0
mov dword [edx + 8], ecx
lea ecx, [ebp - 0x4c]
mov dword [edx + 0xc], eax
mov dword [ebp - 0x10], eax
call fcn.0040239b
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x10], 4
mov eax, dword [ecx]
mov esi, dword [ecx + 4]
mov edx, dword [ecx + 8]
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], esi
mov edx, 0x42ba5c
push 3
call fcn.0040405b
pop eax
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x10], 8
lea ecx, [ebp - 0x1074]
mov dword [ebp - 0x20], eax
push dword [ebp - 0x34]
call fcn.0040405b
pop eax
mov eax, dword [ebp - 0x1070]
mov dword [ebp - 0x10], 9
push 0x800100
push 0
push 0
push 0
mov dword [ebp - 0x34], eax
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
call sub.winhttp.dll_WinHttpOpenRequest
mov ecx, dword [ebp - 0x1074]
mov edx, dword [ebp - 0x34]
mov esi, eax
call fcn.004133b5
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x20]
call fcn.004133b5
test esi, esi
je 0x40442a
lea eax, [ebp - 0x6c]
mov dword [eax], 0x3300
push 4
pop ecx
mov dword [ebp - 0x10], ecx
push ecx
push eax
push 0x1f
mov dword [ebp - 0x20], esi
push esi
call sub.winhttp.dll_WinHttpSetOption
push 0
push 0
push 0
push 0
push 0
push 0
push dword [ebp - 0x20]
call sub.winhttp.dll_WinHttpSendRequest
test eax, eax
je 0x4044ab
push 0
push dword [ebp - 0x20]
call sub.winhttp.dll_WinHttpReceiveResponse
test eax, eax
je 0x4044ea
lea eax, [ebp - 0x70]
lea ecx, [ebp - 0x74]
and dword [eax], 0
mov dword [ecx], 4
push 0
push ecx
push eax
push 0
push 0x20000013
push dword [ebp - 0x20]
call sub.winhttp.dll_WinHttpQueryHeaders
lea eax, [ebp - 0x4c]
and dword [ebp - 0x54], 0
and dword [eax], 0
mov dword [eax + 4], 1
and dword [eax + 8], 0
mov edi, 0x1000
push edi
push 0
lea esi, [ebp - 0x1074]
push esi
call fcn.0041cb50
add esp, 0xc
lea eax, [ebp - 0x54]
mov dword [ebp - 0x10], 0xa
push eax
push edi
push esi
push dword [ebp - 0x20]
call sub.winhttp.dll_WinHttpReadData
test eax, eax
je 0x40446b
mov ecx, dword [ebp - 0x54]
test ecx, ecx
je 0x40446b
cmp ecx, 0x1001
jae 0x40457b
lea eax, [ebp + ecx - 0x1074]
lea ecx, [ebp - 0x4c]
lea edx, [ebp - 0x1074]
push eax
call fcn.00409985
pop eax
jmp 0x404313
sub esp, 4
and dword [esp], 0
xor edx, edx
lea ecx, [ebp - 0x1074]
inc edx
call fcn.00409c4b
pop eax
and dword [ebp - 0x10], 0
push 0xc
pop ecx
call fcn.00402405
mov ecx, dword [ebp - 0x106c]
movsd xmm0, qword [ebp - 0x1074]
mov edx, dword [ebp - 0x28]
mov dword [edx + 4], eax
mov dword [edx + 8], 0x42ba70
mov dword [eax + 8], ecx
movsd qword [eax], xmm0
mov dword [edx], 0x80000000
jmp 0x404567
mov dword [ebp - 0x10], 1
push dword [ebp - 0x24]
call sub.winhttp.dll_WinHttpCloseHandle
sub esp, 4
and dword [esp], 0
xor edx, edx
lea ecx, [ebp - 0x1074]
inc edx
call fcn.00409c4b
pop eax
mov dword [ebp - 0x10], 2
push 0xc
pop ecx
call fcn.00402405
mov ecx, dword [ebp - 0x106c]
movsd xmm0, qword [ebp - 0x1074]
mov edx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x30]
mov dword [edx + 4], eax
mov dword [edx + 8], 0x42ba70
mov dword [eax + 8], ecx
movsd qword [eax], xmm0
mov dword [edx], 0x80000000
jmp 0x40455d
mov dword [ebp - 0x10], 4
push dword [ebp - 0x2c]
call sub.winhttp.dll_WinHttpCloseHandle
push dword [ebp - 0x24]
call sub.winhttp.dll_WinHttpCloseHandle
sub esp, 4
and dword [esp], 0
xor edx, edx
lea ecx, [ebp - 0x1074]
inc edx
call fcn.00409c4b
pop eax
mov dword [ebp - 0x10], 7
push 0xc
pop ecx
call fcn.00402405
jmp 0x404527
push dword [ebp - 0x20]
call sub.winhttp.dll_WinHttpCloseHandle
push dword [ebp - 0x2c]
call sub.winhttp.dll_WinHttpCloseHandle
push dword [ebp - 0x24]
call sub.winhttp.dll_WinHttpCloseHandle
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x28]
movsd xmm0, qword [ebp - 0x4c]
mov edx, dword [ebp - 0x3c]
mov dword [ecx + 8], eax
movsd qword [ecx], xmm0
mov ecx, dword [ebp - 0x38]
call fcn.00409bc0
mov ecx, dword [ebp - 0x68]
mov edx, dword [ebp - 0x30]
jmp 0x404562
push dword [ebp - 0x20]
call sub.winhttp.dll_WinHttpCloseHandle
push dword [ebp - 0x2c]
call sub.winhttp.dll_WinHttpCloseHandle
push dword [ebp - 0x24]
call sub.winhttp.dll_WinHttpCloseHandle
sub esp, 4
and dword [esp], 0
xor edx, edx
lea ecx, [ebp - 0x1074]
inc edx
call fcn.00409c4b
pop eax
mov dword [ebp - 0x10], 5
push 0xc
pop ecx
call fcn.00402405
jmp 0x404527
push dword [ebp - 0x20]
call sub.winhttp.dll_WinHttpCloseHandle
push dword [ebp - 0x2c]
call sub.winhttp.dll_WinHttpCloseHandle
push dword [ebp - 0x24]
call sub.winhttp.dll_WinHttpCloseHandle
sub esp, 4
and dword [esp], 0
xor edx, edx
lea ecx, [ebp - 0x1074]
inc edx
call fcn.00409c4b
pop eax
mov dword [ebp - 0x10], 6
push 0xc
pop ecx
call fcn.00402405
mov ecx, dword [ebp - 0x106c]
movsd xmm0, qword [ebp - 0x1074]
mov edx, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x30]
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 0x28]
movsd qword [eax], xmm0
mov dword [ecx + 4], eax
mov dword [ecx + 8], 0x42ba70
mov dword [ecx], 0x80000000
mov ecx, dword [ebp - 0x38]
call fcn.00409bc0
mov ecx, dword [ebp - 0x68]
mov edx, esi
call fcn.00409bc0
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x1068
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, 0x1000
push 0x42bab0
call fcn.00429ee5
pop eax
ud2