Function at 0x4bcfa0
Capabilities:
Initialize winhttp library

Disassembly:
mov eax, 0x6bfb7e
call fcn.006b6d3c
sub esp, 0xe10
push ebx
push esi
push edi
mov ebx, 0x80bd18
mov esi, ecx
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea edi, [esi + 0xc0]
test byte [edi], 1
je 0x4bcfe3
cmp byte [0x80bd34], 0
je 0x4bcfe3
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
jmp 0x4bd1ae
xor ebx, ebx
cmp dword [0x80bd30], ebx
jne 0x4bd02b
push 0x10000000
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ecx, eax
mov eax, dword [0x80bd30]
mov dword [ebp - 0x10], ecx
cmp ecx, eax
je 0x4bd020
test eax, eax
je 0x4bd019
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp - 0x10]
mov eax, ecx
mov dword [0x80bd30], eax
test eax, eax
jne 0x4bd02b
push 0x80bd18
jmp 0x4bcfd6
mov dword [esi + 0xcc], ebx
mov dword [esi + 0xd0], ebx
mov dword [esi + 0xd4], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
push 0x7f
push 0x200
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], ebx
push eax
mov ecx, esi
call fcn.004945d8
push 0x1ff
lea eax, [ebp - 0x61c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x21c]
push eax
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
mov word [ebp + eax*2 - 0x61c], cx
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x61c]
push eax
push dword [0x80bd30]
call dword [sym.imp.WINHTTP.dll_WinHttpGetProxyForUrl]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x4bd0c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f94
jne 0x4bd1bd
mov byte [0x80bd34], 1
mov edi, dword [ebp - 0x10]
push 0x80bd18
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x4bd190
cmp dword [ebp - 0x1c], 1
je 0x4bd18e
cmp dword [ebp - 0x1c], 3
jne 0x4bd190
mov ecx, dword [ebp - 0x18]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x4bd0f0
push ebx
push ebx
push 0x3ff
sub ecx, edx
lea eax, [ebp - 0xe1c]
push eax
sar ecx, 1
push ecx
push dword [ebp - 0x18]
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
mov eax, ebx
test edx, edx
je 0x4bd159
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x4bd12e
push ebx
push ebx
push 0x3ff
sub ecx, edi
lea eax, [ebp - 0xa1c]
push eax
sar ecx, 1
push ecx
push edx
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [ebp - 0x10]
mov byte [ebp + eax - 0xa1c], bl
lea eax, [ebp - 0xa1c]
push eax
mov byte [ebp + ecx - 0xe1c], bl
mov ecx, esi
call fcn.004bcdb9
test al, al
jne 0x4bd18e
lea eax, [ebp - 0xe1c]
mov ecx, esi
push eax
call fcn.004bced0
test al, al
je 0x4bd190
mov bl, 1
cmp dword [ebp - 0x18], 0
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
je 0x4bd1a1
push dword [ebp - 0x18]
call esi
cmp dword [ebp - 0x14], 0
je 0x4bd1ac
push dword [ebp - 0x14]
call esi
mov al, bl
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2eef
jne 0x4bd0c0
lea eax, [ebp - 0x1c]
mov dword [esi + 0xd4], 1
push eax
push edi
lea eax, [ebp - 0x61c]
push eax
push dword [0x80bd30]
call dword [sym.imp.WINHTTP.dll_WinHttpGetProxyForUrl]
mov edi, eax
jmp 0x4bd0c3