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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x9c
mov esi, edx
mov ebp, ecx
mov eax, dword [esp + 0xb4]
mov ecx, dword [esp + 0xb8]
add ecx, eax
lea edx, [esp + 0x2c]
mov dword [edx], 1
mov dword [edx + 4], eax
mov dword [edx + 8], ecx
mov word [edx + 0xc], 0
lea edi, [esp + 0x54]
mov ecx, edi
call fcn.03d8136f
mov eax, dword [edi + 4]
sub esp, 0x14
xorps xmm0, xmm0
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
test eax, eax
je 0x3d85caf
mov dword [esp], eax
lea edi, [esp + 0x2c]
mov ecx, edi
mov edx, esi
push dword [esp + 0xb0]
call fcn.03d860d5
add esp, 4
mov eax, dword [edi]
cmp eax, 0x80000000
jne 0x3d85cd9
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov dword [ebp + 4], eax
mov dword [ebp + 8], ecx
jmp 0x3d85ccd
call sub.KERNEL32.dll_GetLastError
lea ecx, [esp + 0x2c]
mov byte [ecx], 0
mov dword [ecx + 4], eax
call fcn.03d82864
mov dword [ebp + 4], eax
mov dword [ebp + 8], 0x3dcea88
mov dword [ebp], 0x80000000
jmp 0x3d85fbb
lea edx, [esp + 0x2c]
mov edi, dword [edx + 4]
mov ebx, dword [edx + 8]
movups xmm0, xmmword [edx + 0xc]
movups xmmword [esp + 0x78], xmm0
movups xmm0, xmmword [edx + 0x18]
movups xmmword [esp + 0x84], xmm0
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], edi
mov dword [esp + 0x74], ebx
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x80]
add ecx, eax
mov dword [edx], 1
mov dword [edx + 4], eax
mov dword [edx + 8], ecx
mov word [edx + 0xc], 0
lea esi, [esp + 0x60]
mov ecx, esi
call fcn.03d8136f
movzx eax, word [esp + 0x90]
push 0
push eax
push dword [esi + 4]
mov esi, dword [esp + 0xc]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
test eax, eax
je 0x3d85dbe
mov dword [esp + 8], eax
mov dword [esp + 4], ebp
xor eax, eax
inc eax
lea esi, [esp + 0x2c]
mov dword [esi], eax
mov eax, 0x3dcf1a0
mov dword [esi + 4], eax
lea eax, [0x3dcf1a3]
mov dword [esi + 8], eax
xor ebp, ebp
mov word [esi + 0xc], bp
lea ecx, [esp + 0x14]
mov edx, esi
call fcn.03d8136f
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x8c]
add ecx, eax
xor edx, edx
inc edx
mov dword [esi], edx
mov dword [esi + 4], eax
mov dword [esi + 8], ecx
mov word [esi + 0xc], bp
lea ecx, [esp + 0x20]
lea edx, [esp + 0x2c]
call fcn.03d8136f
cmp ebx, 5
je 0x3d85def
mov eax, dword [esp + 0x18]
mov edx, 0x80
mov ecx, dword [esp + 0x24]
jmp 0x3d85e29
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call sub.KERNEL32.dll_GetLastError
lea ecx, [esp + 0x2c]
mov byte [ecx], 0
mov dword [ecx + 4], eax
call fcn.03d82864
mov dword [ebp + 4], eax
mov dword [ebp + 8], 0x3dcea88
mov dword [ebp], 0x80000000
jmp 0x3d85f99
mov ecx, dword [edi]
bswap ecx
cmp ecx, 0x68747470
jne 0x3d85e04
movzx eax, byte [edi + 4]
add eax, 0xffffff8d
jmp 0x3d85e11
xor eax, eax
cmp ecx, 0x68747470
sbb eax, eax
or eax, 1
xor edx, edx
test eax, eax
sete dl
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
shl edx, 0x17
or edx, 0x80
xor esi, esi
push edx
push esi
push esi
push esi
push ecx
push eax
mov edi, dword [esp + 0x20]
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
test eax, eax
je 0x3d85f31
mov ebp, eax
sub esp, 0x1c
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], esi
xorps xmm0, xmm0
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x3d85f22
push 0
push ebp
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x3d85f22
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], 1
mov dword [esp + 0x34], eax
lea ecx, [esp + 0xc]
mov dword [ecx], eax
push ecx
push ebp
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x3d85fdf
mov esi, dword [esp + 0xc]
test esi, esi
je 0x3d86040
mov ecx, esi
xor edx, edx
inc edx
call fcn.03da19ec
mov edi, eax
mov ebx, edx
mov dword [esp + 0x10], 0
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x10]
push edx
push ebp
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x3d8606e
mov ecx, dword [esp + 0x10]
cmp esi, ecx
jb 0x3d860c9
mov eax, ebx
add eax, ecx
lea ecx, [esp + 0x2c]
mov edx, ebx
push eax
call fcn.03da0be8
add esp, 4
test edi, edi
je 0x3d85f10
push ebx
push 0
push dword [0x3de3a38]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esp + 0xc], 0
lea eax, [esp + 0xc]
push eax
jmp 0x3d85e94
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push ebp
call esi
push dword [esp + 8]
jmp 0x3d85f38
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push edi
call esi
push dword [esp]
call esi
call sub.KERNEL32.dll_GetLastError
lea ecx, [esp + 0x2c]
mov byte [ecx], 0
mov dword [ecx + 4], eax
call fcn.03d82864
mov ecx, dword [esp + 4]
mov dword [ecx + 4], eax
mov dword [ecx + 8], 0x3dcea88
mov dword [ecx], 0x80000000
cmp dword [esp + 0x20], 0
je 0x3d85f80
push dword [esp + 0x24]
push 0
push dword [0x3de3a38]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [esp + 0x14], 0
je 0x3d85f99
push dword [esp + 0x18]
push 0
push dword [0x3de3a38]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [esp + 0x60], 0
je 0x3d85fb2
push dword [esp + 0x64]
push 0
push dword [0x3de3a38]
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea ecx, [esp + 0x6c]
call fcn.03d86642
cmp dword [esp + 0x54], 0
je 0x3d85fd4
push dword [esp + 0x58]
push 0
push dword [0x3de3a38]
call dword [sym.imp.KERNEL32.dll_HeapFree]
add esp, 0x9c
pop esi
pop edi
pop ebx
pop ebp
ret
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push ebp
call esi
push dword [esp + 8]
call esi
push dword [esp]
call esi
call sub.KERNEL32.dll_GetLastError
lea ecx, [esp + 0x94]
mov byte [ecx], 0
mov dword [ecx + 4], eax
call fcn.03d82864
mov ecx, dword [esp + 4]
mov dword [ecx + 4], eax
mov dword [ecx + 8], 0x3dcea88
mov dword [ecx], 0x80000000
cmp dword [esp + 0x2c], 0
je 0x3d85f67
push dword [esp + 0x30]
push 0
push dword [0x3de3a38]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x3d85f67
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push ebp
call esi
push dword [esp + 8]
call esi
push dword [esp]
call esi
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 4]
mov dword [ecx + 8], eax
movsd xmm0, qword [esp + 0x2c]
movsd qword [ecx], xmm0
jmp 0x3d85f67
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push ebp
call esi
push dword [esp + 8]
call esi
push dword [esp]
call esi
call sub.KERNEL32.dll_GetLastError
lea ecx, [esp + 0x94]
mov byte [ecx], 0
mov dword [ecx + 4], eax
call fcn.03d82864
mov ecx, dword [esp + 4]
mov dword [ecx + 4], eax
mov dword [ecx + 8], 0x3dcea88
mov dword [ecx], 0x80000000
test edi, edi
je 0x3d8601e
push ebx
push 0
push dword [0x3de3a38]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x3d8601e
mov edx, esi
push 0x3dcf1a4
call fcn.03dcc310