Function at 0x402990
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41f1a0
mov eax, dword fs:[0]
push eax
mov eax, 0x1b04
call fcn.00408800
mov eax, dword [0x42a080]
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 esi, ecx
push 0x38
lea eax, [ebp - 0x1a50]
mov dword [ebp - 0x1a54], 0x3c
push 0
push eax
xor bl, bl
call fcn.00409440
lea eax, [ebp - 0x210]
mov dword [ebp - 0x1a40], 0x100
mov dword [ebp - 0x1a44], eax
add esp, 0xc
cmp dword [esi + 0x14], 7
lea eax, [ebp - 0xa10]
mov dword [ebp - 0x1a28], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x1a24], 0x400
jbe 0x402a1c
mov esi, dword [esi]
lea ecx, [ebp - 0x1a54]
push ecx
push 0
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x402cdb
push 0
push 0
push 0
push 0
push str.Mozilla_5.0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x1b10], eax
test eax, eax
je 0x402cdb
push 0
push dword [ebp - 0x1a3c]
push dword [ebp - 0x1a44]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0x1b0c], ecx
test ecx, ecx
je 0x402ccf
xor eax, eax
mov esi, 0x1bb
cmp word [ebp - 0x1a3c], si
mov edx, 0x800000
cmove eax, edx
push eax
push 0
push 0
push 0
push dword [ebp - 0x1a28]
push 0x427084
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
test esi, esi
je 0x402cc1
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x402cb6
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x402cb6
push 0xb0
lea eax, [ebp - 0x1b08]
push 0
push eax
call fcn.00409440
add esp, 0xc
cmp dword [edi + 0x14], 7
jbe 0x402afe
mov edi, dword [edi]
sub esp, 0xc
lea ecx, [ebp - 0x1b08]
push edi
call fcn.00405220
mov eax, dword [ebp - 0x1b08]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1b08]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x1b0c], eax
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x1b08]
mov eax, dword [ecx + 4]
test byte [ebp + eax - 0x1afc], 6
jne 0x402c43
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
lea eax, [ebp - 0x1a14]
push eax
push esi
mov dword [ebp - 0x1a18], 0
mov dword [ebp - 0x1a14], 0
call ebx
test eax, eax
je 0x402c03
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpReadData]
cmp dword [ebp - 0x1a14], 0
jbe 0x402c03
lea eax, [ebp - 0x1a18]
push eax
push 0x1000
lea eax, [ebp - 0x1a10]
push eax
push esi
call edi
test eax, eax
je 0x402bf5
nop word [eax + eax]
mov eax, dword [ebp - 0x1a18]
test eax, eax
je 0x402bf5
push 0
push eax
lea eax, [ebp - 0x1a10]
push eax
lea ecx, [ebp - 0x1b08]
call fcn.00404790
mov eax, dword [ebp - 0x1a18]
sub dword [ebp - 0x1a14], eax
lea eax, [ebp - 0x1a18]
push eax
push 0x1000
lea eax, [ebp - 0x1a10]
push eax
push esi
call edi
test eax, eax
jne 0x402bb0
lea eax, [ebp - 0x1a14]
push eax
push esi
call ebx
test eax, eax
jne 0x402b84
lea ecx, [ebp - 0x1b04]
call fcn.00405140
test eax, eax
jne 0x402c3b
mov eax, dword [ebp - 0x1b08]
lea ecx, [ebp - 0x1b08]
push 0
add ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.00401f90
mov ecx, dword [ebp - 0x1b08]
mov bl, 1
mov eax, dword [ecx + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1b08]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x1b0c], eax
lea ecx, [ebp - 0x1b04]
call fcn.00404420
mov eax, dword [ebp - 0x1b08]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1b08]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x1b0c], eax
lea eax, [ebp - 0x1aa0]
mov dword [ebp - 4], 1
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00407134
add esp, 4
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
jmp 0x402cc7
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x1b0c]
call esi
push dword [ebp - 0x1b10]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov al, bl
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.0040781e
mov esp, ebp
pop ebp
ret