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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x443751
mov eax, dword fs:[0]
push eax
mov eax, 0x29a0
call fcn.00424ef0
mov eax, dword [0x459054]
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 ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x298c], ebx
cmp dword [ebx + 0x14], 0x10
mov dword [ebx + 0x10], 0
jb 0x40b28f
mov eax, dword [ebx]
jmp 0x40b291
mov eax, ebx
mov byte [eax], 0
test esi, esi
je 0x40b7c0
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b2a1
sub ecx, edx
cmp ecx, 5
jb 0x40b7c0
push 0x3c
lea eax, [ebp - 0x2988]
push 0
push eax
call fcn.00427f80
push 0x100
lea eax, [ebp - 0x110]
mov dword [ebp - 0x2988], 0x3c
push 0
push eax
call fcn.00427f80
lea eax, [ebp - 0x110]
mov dword [ebp - 0x2980], 0x80
push 0x800
mov dword [ebp - 0x2984], eax
lea eax, [ebp - 0x910]
push 0
push eax
call fcn.00427f80
lea eax, [ebp - 0x910]
mov dword [ebp - 0x2974], 0x400
push 0x800
mov dword [ebp - 0x2978], eax
lea eax, [ebp - 0x1110]
push 0
push eax
call fcn.00427f80
lea eax, [ebp - 0x1110]
mov dword [ebp - 0x2958], 0x400
push 0x800
mov dword [ebp - 0x295c], eax
lea eax, [ebp - 0x1910]
push 0
push eax
call fcn.00427f80
add esp, 0x3c
mov dword [ebp - 0x2950], 0x400
cmp byte [esi], 0
lea eax, [ebp - 0x1910]
mov dword [ebp - 0x2954], eax
mov dword [ebp - 0x2998], 0xf
mov dword [ebp - 0x299c], 0
mov byte [ebp - 0x29ac], 0
jne 0x40b398
xor ecx, ecx
jmp 0x40b3a9
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b3a0
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x29ac]
call fcn.00408590
push 0
lea eax, [ebp - 0x29ac]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x294c]
push eax
call fcn.0040cb80
add esp, 0xc
mov eax, dword [ebp - 0x2998]
mov byte [ebp - 4], 2
cmp eax, 0x10
jb 0x40b429
mov ecx, dword [ebp - 0x29ac]
inc eax
cmp eax, 0x1000
jb 0x40b420
test cl, 0x1f
je 0x40b3fc
call fcn.0042b711
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x40b408
call fcn.0042b711
sub ecx, eax
cmp ecx, 4
jae 0x40b414
call fcn.0042b711
cmp ecx, 0x23
jbe 0x40b41e
call fcn.0042b711
mov ecx, eax
push ecx
call fcn.004249eb
add esp, 4
cmp dword [ebp - 0x2938], 8
lea ecx, [ebp - 0x2988]
push ecx
push 0x80000000
push dword [ebp - 0x293c]
lea eax, [ebp - 0x294c]
mov dword [ebp - 0x2998], 0xf
cmovae eax, dword [ebp - 0x294c]
push eax
mov dword [ebp - 0x299c], 0
mov byte [ebp - 0x29ac], 0
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x40b485
lea ecx, [ebp - 0x294c]
call fcn.004011f0
jmp 0x40b7c0
push 0
push 0
push 0
push 1
push str.Mozilla_5.0__compatible__MSIE_9.0__Windows_NT_10__WOW64_
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov edi, eax
mov dword [ebp - 0x2994], edi
test edi, edi
je 0x40b475
push 0x2710
push 0x2710
push 0x2710
push 0x2710
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
push 0
push dword [ebp - 0x2970]
push dword [ebp - 0x2978]
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x2990], eax
test eax, eax
jne 0x40b4f4
lea ecx, [ebp - 0x294c]
call fcn.004011f0
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x40b7bd
mov edx, dword [ebp - 0x295c]
xor eax, eax
mov dword [ebp - 0x2920], 7
mov dword [ebp - 0x2924], 0
mov word [ebp - 0x2934], ax
cmp word [edx], ax
jne 0x40b520
xor ecx, ecx
jmp 0x40b534
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b525
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x2934]
call fcn.00401e60
mov edx, dword [ebp - 0x2954]
mov byte [ebp - 4], 3
cmp word [edx], 0
jne 0x40b555
xor ecx, ecx
jmp 0x40b56f
mov ecx, edx
lea esi, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b560
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x2934]
call fcn.00401c10
cmp dword [ebp - 0x2920], 8
lea eax, [ebp - 0x2934]
push 0
cmovae eax, dword [ebp - 0x2934]
push 0
push 0
push 0
push eax
push 0x446294
push dword [ebp - 0x2990]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
test esi, esi
jne 0x40b5d1
lea ecx, [ebp - 0x2934]
call fcn.004011f0
lea ecx, [ebp - 0x294c]
call fcn.004011f0
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x40b7b5
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x40b603
lea ecx, [ebp - 0x2934]
call fcn.004011f0
lea ecx, [ebp - 0x294c]
call fcn.004011f0
jmp 0x40b7ac
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x40b5e8
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpReadData]
mov dword [ebp - 0x2918], 0
nop word [eax + eax]
push 0x1001
lea eax, [ebp - 0x2914]
push 0
push eax
call fcn.00427f80
add esp, 0xc
lea eax, [ebp - 0x2918]
push eax
push esi
call edi
test eax, eax
je 0x40b6a2
cmp dword [ebp - 0x2918], 0
je 0x40b6a2
lea eax, [ebp - 0x291c]
mov dword [ebp - 0x291c], 0
push eax
push 0x1000
lea eax, [ebp - 0x2914]
push eax
push esi
call ebx
test eax, eax
je 0x40b6a2
push dword [ebp - 0x291c]
mov ecx, dword [ebp - 0x298c]
lea eax, [ebp - 0x2914]
push eax
call fcn.0040b7e0
cmp dword [ebp - 0x2918], 0
ja 0x40b630
mov eax, dword [ebp - 0x2920]
cmp eax, 8
jb 0x40b704
mov ecx, dword [ebp - 0x2934]
inc eax
cmp eax, 0x7fffffff
jbe 0x40b6c0
call fcn.0042b711
add eax, eax
cmp eax, 0x1000
jb 0x40b6fb
test byte [ebp - 0x2934], 0x1f
je 0x40b6d7
call fcn.0042b711
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x40b6e3
call fcn.0042b711
sub ecx, eax
cmp ecx, 4
jae 0x40b6ef
call fcn.0042b711
cmp ecx, 0x23
jbe 0x40b6f9
call fcn.0042b711
mov ecx, eax
push ecx
call fcn.004249eb
add esp, 4
xor eax, eax
mov dword [ebp - 0x2920], 7
mov word [ebp - 0x2934], ax
mov eax, dword [ebp - 0x2938]
mov dword [ebp - 0x2924], 0
cmp eax, 8
jb 0x40b783
mov ecx, dword [ebp - 0x294c]
inc eax
cmp eax, 0x7fffffff
jbe 0x40b73f
call fcn.0042b711
add eax, eax
cmp eax, 0x1000
jb 0x40b77a
test byte [ebp - 0x294c], 0x1f
je 0x40b756
call fcn.0042b711
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x40b762
call fcn.0042b711
sub ecx, eax
cmp ecx, 4
jae 0x40b76e
call fcn.0042b711
cmp ecx, 0x23
jbe 0x40b778
call fcn.0042b711
mov ecx, eax
push ecx
call fcn.004249eb
add esp, 4
mov ebx, dword [ebp - 0x298c]
xor eax, eax
mov edi, dword [ebp - 0x2994]
mov dword [ebp - 0x2938], 7
mov dword [ebp - 0x293c], 0
mov word [ebp - 0x294c], ax
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x2990]
call esi
push edi
call esi
mov eax, dword [ebx + 0x10]
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.00424ea2
mov esp, ebp
pop ebp
ret