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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x415b95
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x41e040]
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 al, byte [ebp + 0x3c]
mov byte [ebp - 0x55], al
mov esi, dword [ebp + 0x38]
mov dword [ebp - 4], 1
test esi, esi
js 0x401358
xor edi, edi
mov dword [ebp - 0x20], 0
push edi
push edi
push edi
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
push edi
push 0x41baac
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x14], 0x3300
movlpd qword [ebp - 0x30], xmm0
movlpd qword [ebp - 0x28], xmm0
movq qword [ebp - 0x44], xmm0
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x34], 3
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ebx, eax
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpGetIEProxyConfigForCurrentUser]
test eax, eax
je 0x401192
mov ecx, dword [ebp - 0x4c]
test ecx, ecx
je 0x4010fe
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x44], 3
mov eax, dword [ebp - 0x50]
mov edx, dword [sym.imp.WINHTTP.dll_WinHttpGetProxyForUrl]
test eax, eax
je 0x401145
cmp dword [ebp + 0x1c], 7
lea ecx, [ebp - 0x44]
push ecx
mov dword [ebp - 0x30], eax
lea ecx, [ebp - 0x38]
lea eax, [ebp + 8]
mov dword [ebp - 0x38], 2
cmova eax, dword [ebp + 8]
push ecx
push eax
push ebx
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
call edx
mov ecx, dword [ebp - 0x4c]
mov edx, dword [sym.imp.WINHTTP.dll_WinHttpGetProxyForUrl]
cmp dword [ebp - 0x54], edi
je 0x401183
test ecx, ecx
jne 0x401183
cmp dword [ebp + 0x1c], 7
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], 1
lea eax, [ebp + 8]
mov dword [ebp - 0x34], 3
cmova eax, dword [ebp + 8]
push ecx
push eax
push ebx
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
call edx
push 0xc
lea eax, [ebp - 0x44]
push eax
push 0x26
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test ebx, ebx
je 0x4011f2
test esi, esi
jne 0x4011ab
cmp byte [ebp - 0x55], 0
mov esi, 0x50
mov ecx, 0x1bb
cmovne esi, ecx
cmp dword [ebp + 0x1c], 7
lea eax, [ebp + 8]
push 0
cmova eax, dword [ebp + 8]
push esi
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edx, eax
mov dword [ebp - 0x5c], edx
test edx, edx
je 0x4011f2
cmp dword [ebp + 0x34], 7
lea ecx, [ebp + 0x20]
movzx eax, byte [ebp - 0x55]
cmova ecx, dword [ebp + 0x20]
shl eax, 0x17
push eax
push 0
push 0
push 0
push ecx
push 0x41bab4
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
cmp byte [ebp - 0x55], 0
je 0x40121d
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
lea eax, [ebp - 0x14]
push 4
push eax
push 0x1f
push edi
mov dword [ebp - 0x18], 0x2aa8
call esi
push 4
lea eax, [ebp - 0x18]
push eax
push 0x54
push edi
call esi
jmp 0x40121f
xor eax, eax
test edi, edi
je 0x401236
push 0
push 0
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x40129c
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x40129c
nop word [eax + eax]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov eax, dword [ebp - 0x20]
inc eax
push eax
call fcn.00403a60
mov ecx, dword [ebp - 0x20]
mov esi, eax
inc ecx
push ecx
push 0
push esi
call fcn.00405330
add esp, 0x10
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x20]
push esi
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
push esi
call fcn.00403a48
add esp, 4
cmp dword [ebp - 0x20], 0
ja 0x401250
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test edi, edi
je 0x4012a9
push edi
call esi
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x4012b3
push eax
call esi
test ebx, ebx
je 0x4012ba
push ebx
call esi
mov ecx, dword [ebp + 0x1c]
cmp ecx, 7
jbe 0x4012f0
mov edx, dword [ebp + 8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4012e6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40135f
push ecx
push edx
call fcn.00403a52
add esp, 8
mov ecx, dword [ebp + 0x34]
xor eax, eax
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x1c], 7
mov word [ebp + 8], ax
cmp ecx, 7
jbe 0x40133a
mov edx, dword [ebp + 0x20]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401330
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40135f
push ecx
push edx
call fcn.00403a52
add esp, 8
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.00403a3a
mov esp, ebp
pop ebp
ret 0x38
push 0xffffffffffffff9d
call fcn.004070cb
call fcn.004073fd
int3