Function at 0x40b6e0
Capabilities:
Initialize winhttp library

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x446b88
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x45b8b4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 1
call dword [0x45cbd8]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x15], 1
call fcn.0041623a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40b739
push 0x80004005
call fcn.00403720
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 2
call fcn.00404020
mov esi, eax
xor eax, eax
push eax
push eax
push eax
push 1
push eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
test eax, eax
mov dword [ebp - 0x24], eax
je 0x40b92e
mov ebx, dword [ebp + 0xc]
test ebx, ebx
jne 0x40b793
mov dword [ebp - 0x40], ebx
jmp 0x40b7c9
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
add edi, 1
cmp edi, 0x3fffffff
jle 0x40b7b0
mov dword [ebp - 0x40], 0
jmp 0x40b7c9
lea eax, [edi + edi]
call fcn.004335a0
mov ecx, dword [ebp - 0x1c]
mov eax, esp
push ecx
push edi
push ebx
push eax
call fcn.0040bb20
mov dword [ebp - 0x40], eax
push ecx
xor eax, eax
mov ecx, esp
mov dword [ebp - 0x1c], esp
push 0x44f990
mov dword [ebp - 0x48], 2
mov dword [ebp - 0x44], 3
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x34], 1
call fcn.004039f0
mov ecx, esi
call fcn.00404170
mov edi, dword [ebp + 8]
mov ebx, dword [edi - 0xc]
call dword [0x45cbd8]
push 0
push 0
push ebx
push edi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push eax
push 0
mov dword [ebp - 0x1c], eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov edi, eax
test edi, edi
je 0x40b8ca
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
push edx
push edi
push ebx
push eax
push 0
call dword [0x45cbd8]
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 0x48]
push edx
push edi
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpGetProxyForUrl]
test eax, eax
je 0x40b8cf
mov ecx, dword [ebp - 0x30]
mov edi, dword [ebp + 0x10]
mov edx, dword [ebp - 0x2c]
mov dword [edi], ecx
lea ebx, [edi + 4]
push edx
mov ecx, ebx
call fcn.0040ba80
mov eax, dword [ebp - 0x28]
lea ecx, [edi + 8]
push eax
call fcn.0040ba80
mov ecx, dword [edi + 8]
mov edx, dword [ebx]
mov eax, dword [edi]
push ecx
push edx
push eax
lea ecx, [ebp - 0x20]
push str._d__s__s
push ecx
call fcn.00403d50
mov edi, dword [ebp - 0x20]
add esp, 0x10
add edi, 0xfffffff0
mov dword [ebp - 0x1c], esp
mov ebx, esp
push edi
call fcn.00403f60
add eax, 0x10
add esp, 4
mov ecx, esi
mov dword [ebx], eax
call fcn.00404170
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x40b981
jmp fcn.00403960
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push str._ERROR__WinHttpGetProxyForUrl
call fcn.004039f0
mov ecx, esi
call fcn.00404170
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0x20]
push str._ERROR___d_has_occurred
push edx
call fcn.00403d50
mov edi, dword [ebp - 0x20]
add esp, 8
add edi, 0xfffffff0
mov dword [ebp - 0x1c], esp
mov ebx, esp
push edi
call fcn.00403f60
add eax, 0x10
add esp, 4
mov ecx, esi
mov dword [ebx], eax
call fcn.00404170
mov eax, dword [ebp - 0x24]
push eax
mov byte [ebp - 0x15], 0
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x40b981
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push str._ERROR__WinHttpOpen
call fcn.004039f0
mov ecx, esi
call fcn.00404170
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x20]
push str._ERROR___d_has_occurred
push ecx
call fcn.00403d50
mov edi, dword [ebp - 0x20]
add esp, 8
add edi, 0xfffffff0
mov dword [ebp - 0x1c], esp
mov ebx, esp
push edi
call fcn.00403f60
add eax, 0x10
add esp, 4
mov ecx, esi
mov dword [ebx], eax
call fcn.00404170
mov byte [ebp - 0x15], 0
mov eax, dword [ebp - 0x2c]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
je 0x40b991
push eax
call esi
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40b99b
push eax
call esi
mov byte [ebp - 4], 1
lea edx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x40b9b8
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b9db
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ba01
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, byte [ebp - 0x15]
lea esp, [ebp - 0x5c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0042e419
mov esp, ebp
pop ebp
ret