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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4148b2
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0xa88
mov eax, dword [0x41b040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
mov dword [ebp - 0xa84], edi
mov dword [ebp - 0xa94], edi
xorps xmm0, xmm0
mov dword [ebp - 0xa80], 0
movups xmmword [edi], xmm0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
mov dword [ebp - 4], 0
mov eax, esi
cmp dword [esi + 0x14], 0xf
mov dword [ebp - 0xa80], 1
jbe 0x40dceb
mov eax, dword [esi]
push 0
push 0
push dword [esi + 0x10]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push eax
xorps xmm0, xmm0
mov dword [ebp - 0xa78], eax
push ecx
lea ecx, [ebp - 0xa34]
mov dword [ebp - 0xa24], 0
movups xmmword [ebp - 0xa34], xmm0
mov dword [ebp - 0xa20], 0
call fcn.0040e040
cmp dword [ebp - 0xa20], 7
lea eax, [ebp - 0xa34]
mov ecx, dword [esi + 0x10]
cmova eax, dword [ebp - 0xa34]
cmp dword [esi + 0x14], 0xf
mov dword [ebp - 0xa80], 3
jbe 0x40dd5a
mov esi, dword [esi]
push dword [ebp - 0xa78]
push eax
push ecx
push esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push 0
push 0
push str.A_WinHTTP_Example_Program_1.0
mov dword [ebp - 4], 1
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov esi, eax
mov dword [ebp - 0xa84], esi
test esi, esi
je 0x40dfd0
cmp dword [ebp - 0xa20], 7
lea eax, [ebp - 0x218]
mov dword [ebp - 0xa64], eax
lea ecx, [ebp - 0xa74]
push ecx
lea eax, [ebp - 0xa18]
mov dword [ebp - 0xa68], 0
mov dword [ebp - 0xa48], eax
xorps xmm0, xmm0
push 0
push dword [ebp - 0xa24]
lea eax, [ebp - 0xa34]
movlpd qword [ebp - 0xa70], xmm0
cmova eax, dword [ebp - 0xa34]
push eax
movlpd qword [ebp - 0xa5c], xmm0
movlpd qword [ebp - 0xa54], xmm0
mov dword [ebp - 0xa4c], 0
movlpd qword [ebp - 0xa40], xmm0
mov dword [ebp - 0xa74], 0x3c
mov dword [ebp - 0xa60], pe_nt_image_headers32
mov dword [ebp - 0xa44], 0x400
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
push 0
push dword [ebp - 0xa5c]
push dword [ebp - 0xa64]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0xa90], ecx
test ecx, ecx
je 0x40dfc9
xor eax, eax
mov esi, 0x1bb
cmp word [ebp - 0xa5c], si
mov edx, 0x800000
cmove eax, edx
push eax
push 0
push 0
push 0
push dword [ebp - 0xa48]
push 0x415d34
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0xa7c], esi
test esi, esi
je 0x40dfb5
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 0x40dfaa
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x40dfaa
mov dword [ebp - 0xa38], 0
nop dword [eax + eax]
lea eax, [ebp - 0xa38]
mov dword [ebp - 0xa1c], 0
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov eax, dword [ebp - 0xa38]
inc eax
push eax
call fcn.004125d8
mov esi, eax
mov eax, dword [ebp - 0xa38]
inc eax
mov dword [ebp - 0xa78], esi
push eax
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
lea eax, [ebp - 0xa1c]
push eax
push dword [ebp - 0xa38]
push esi
push dword [ebp - 0xa7c]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
mov eax, dword [edi + 0x14]
mov edx, dword [edi + 0x10]
sub eax, edx
mov ecx, dword [ebp - 0xa1c]
mov dword [ebp - 0xa88], ecx
cmp ecx, eax
ja 0x40df77
cmp dword [edi + 0x14], 0xf
lea eax, [edx + ecx]
mov dword [edi + 0x10], eax
mov eax, edi
jbe 0x40df52
mov eax, dword [edi]
push ecx
push dword [ebp - 0xa78]
lea esi, [eax + edx]
push esi
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0xa88]
add esp, 0xc
mov byte [esi + eax], 0
mov esi, dword [ebp - 0xa78]
jmp 0x40df8e
push ecx
push esi
mov byte [ebp - 0xa8c], 0
push dword [ebp - 0xa8c]
push ecx
mov ecx, edi
call fcn.00403190
push esi
call fcn.00412382
mov esi, dword [ebp - 0xa7c]
add esp, 4
cmp dword [ebp - 0xa38], 0
ja 0x40ded0
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
jmp 0x40dfbb
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0xa90]
call esi
mov esi, dword [ebp - 0xa84]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp - 0xa20]
cmp ecx, 7
jbe 0x40e012
mov edx, dword [ebp - 0xa34]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40e008
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40e008
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00412260
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041210d
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret