Function at 0x401390
Capabilities:
Check http status code
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40f6ca
mov eax, dword fs:[0]
push eax
sub esp, 0xd8
mov eax, dword [0x417040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xb0], edx
mov esi, ecx
mov dword [ebp - 0xbc], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 4], 0
xor edi, edi
mov dword [ebp - 0xe4], esi
xorps xmm0, xmm0
mov dword [ebp - 0xc0], 0
push edi
movups xmmword [esi], xmm0
push 0x414e18
mov dword [ebp - 0xc4], 0
mov dword [ebp - 0xb8], edi
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
call fcn.00402e00
mov eax, dword [ebp - 0xb0]
mov edx, eax
mov dword [ebp - 4], edi
mov dword [ebp - 0xc0], 1
mov dword [ebp - 0x68], edi
mov ecx, dword [eax + 0x10]
inc ecx
mov dword [ebp - 0x30], edi
cmp dword [eax + 0x14], 0xf
mov dword [ebp - 0xac], edi
mov dword [ebp - 0xa8], ecx
jbe 0x401441
mov edx, dword [eax]
push 0
push 0
push ecx
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
mov dword [ebp - 0xc8], eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004034a1
mov ecx, eax
add esp, 4
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0xb4], ecx
cmp dword [eax + 0x14], 0xf
jbe 0x401486
mov eax, dword [eax]
push dword [ebp - 0xc8]
push ecx
push dword [ebp - 0xa8]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edx, dword [ebp - 0xb4]
xorps xmm0, xmm0
mov ecx, edx
mov dword [ebp - 0x54], 0
movups xmmword [ebp - 0x64], xmm0
mov dword [ebp - 0x50], 0
lea eax, [ecx + 2]
mov dword [ebp - 0xa8], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4014c4
sub ecx, dword [ebp - 0xa8]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x64]
call fcn.00402ba0
push dword [ebp - 0xb4]
mov dword [ebp - 0xc0], 3
call fcn.0040320d
add esp, 4
push 0
push 0
push 0
push 4
push str.WinHTTP_Example_1.0
mov dword [ebp - 4], 1
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0xb0], eax
test eax, eax
je 0x401852
push 0x7d0
push 0x7d0
push 0x7d0
push 0x7d0
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
cmp dword [ebp - 0x50], 7
lea ecx, [ebp - 0xa4]
push ecx
push 0
xorps xmm0, xmm0
mov dword [ebp - 0xa0], 0
lea eax, [ebp - 0x64]
movlpd qword [ebp - 0x98], xmm0
cmova eax, dword [ebp - 0x64]
push 0
push eax
movlpd qword [ebp - 0x8c], xmm0
movlpd qword [ebp - 0x84], xmm0
movlpd qword [ebp - 0x7c], xmm0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0xa4], 0x3c
mov dword [ebp - 0x9c], 0xffffffff
mov dword [ebp - 0x90], 0xffffffff
mov dword [ebp - 0x74], 0xffffffff
mov dword [ebp - 0x6c], 0xffffffff
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x401852
push dword [ebp - 0x90]
xorps xmm0, xmm0
mov dword [ebp - 0x3c], 0
push dword [ebp - 0x94]
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x38], 0
movups xmmword [ebp - 0x4c], xmm0
call fcn.00402ba0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x28]
push dword [ebp - 0x74]
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
push dword [ebp - 0x78]
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x14], 0
call fcn.00402ba0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xe0]
push dword [ebp - 0x6c]
xorps xmm0, xmm0
mov dword [ebp - 0xd0], 0
push dword [ebp - 0x70]
movups xmmword [ebp - 0xe0], xmm0
mov dword [ebp - 0xcc], 0
call fcn.00402ba0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xe0]
cmp dword [ebp - 0xcc], 7
mov edx, dword [ebp - 0x18]
cmova ecx, dword [ebp - 0xe0]
mov eax, dword [ebp - 0x14]
sub eax, edx
mov dword [ebp - 0xb4], edx
mov edx, dword [ebp - 0xd0]
mov dword [ebp - 0xa8], ecx
cmp edx, eax
ja 0x4016be
mov ecx, dword [ebp - 0xb4]
lea esi, [ebp - 0x28]
cmp dword [ebp - 0x14], 7
cmova esi, dword [ebp - 0x28]
lea eax, [edx + ecx]
mov dword [ebp - 0x18], eax
lea eax, [edx + edx]
push eax
push dword [ebp - 0xa8]
lea ecx, [esi + ecx*2]
push ecx
call fcn.00405ad0
mov eax, dword [ebp - 0xd0]
add esp, 0xc
add eax, dword [ebp - 0xb4]
xor ecx, ecx
mov word [esi + eax*2], cx
mov esi, dword [ebp - 0xbc]
jmp 0x4016d6
push edx
push ecx
mov byte [ebp - 0xa8], 0
lea ecx, [ebp - 0x28]
push dword [ebp - 0xa8]
push edx
call fcn.00402ef0
mov ecx, dword [ebp - 0xe0]
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0xcc]
cmp eax, 7
jbe 0x40171a
lea edx, [eax*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401710
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4019e4
push edx
push ecx
call fcn.00403493
add esp, 8
cmp dword [ebp - 0x38], 7
lea eax, [ebp - 0x4c]
push 0
push dword [ebp - 0x8c]
cmova eax, dword [ebp - 0x4c]
push eax
push dword [ebp - 0xb0]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edx, eax
mov dword [ebp - 0xc4], edx
test edx, edx
je 0x4017ae
cmp dword [ebp - 0x14], 7
lea ecx, [ebp - 0x28]
mov edi, 0x800000
cmova ecx, dword [ebp - 0x28]
xor eax, eax
cmp dword [ebp - 0x98], 2
cmove eax, edi
push eax
push 0
push 0
push 0
push ecx
push 0x414e44
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
mov dword [ebp - 0xb8], edi
test edi, edi
je 0x4017ae
push 0
push 0
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0xac], eax
test eax, eax
je 0x4017ae
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0xac], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x14]
cmp ecx, 7
jbe 0x4017ec
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4017e2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4019e4
push ecx
push edx
call fcn.00403493
add esp, 8
xor eax, eax
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp ecx, 7
jbe 0x40183e
mov edx, dword [ebp - 0x4c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401834
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4019e4
push ecx
push edx
call fcn.00403493
add esp, 8
xor eax, eax
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 7
mov word [ebp - 0x4c], ax
cmp dword [ebp - 0xac], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x34], 4
je 0x401966
push 0
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x2c]
push eax
push 0
push 0x20000013
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x401966
cmp dword [ebp - 0x2c], 0xc8
jne 0x401966
nop word [eax + eax]
lea eax, [ebp - 0x68]
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x401966
mov eax, dword [ebp - 0x68]
inc eax
push eax
call fcn.004034a1
mov ecx, eax
mov eax, dword [ebp - 0x68]
inc eax
mov dword [ebp - 0xac], ecx
push eax
push 0
push ecx
call fcn.00404630
add esp, 0x10
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x68]
push dword [ebp - 0xac]
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x401948
mov edx, dword [esi + 0x14]
mov eax, edx
mov ecx, dword [esi + 0x10]
sub eax, ecx
mov edi, dword [ebp - 0x30]
cmp edi, eax
ja 0x401926
lea eax, [edi + ecx]
mov dword [esi + 0x10], eax
mov eax, esi
cmp edx, 0xf
jbe 0x40190d
mov eax, dword [esi]
push edi
push dword [ebp - 0xac]
lea esi, [eax + ecx]
push esi
call fcn.00405ad0
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x401942
push edi
push dword [ebp - 0xac]
mov byte [ebp - 0xa8], 0
mov ecx, esi
push dword [ebp - 0xa8]
push edi
call fcn.00402ca0
mov edi, dword [ebp - 0xb8]
push dword [ebp - 0xac]
call fcn.0040320d
mov esi, dword [ebp - 0xbc]
add esp, 4
cmp dword [ebp - 0x68], 0
ja 0x4018a0
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test edi, edi
je 0x401973
push edi
call esi
mov eax, dword [ebp - 0xc4]
test eax, eax
je 0x401980
push eax
call esi
mov eax, dword [ebp - 0xb0]
test eax, eax
je 0x40198d
push eax
call esi
mov ecx, dword [ebp - 0x50]
cmp ecx, 7
jbe 0x4019c3
mov edx, dword [ebp - 0x64]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4019b9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4019e9
push ecx
push edx
call fcn.00403493
add esp, 8
mov eax, dword [ebp - 0xbc]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004031ff
mov esp, ebp
pop ebp
ret
call fcn.004066fd
call fcn.004066fd
int3