Function at 0x515cc0
Capabilities:
Get proxy

Disassembly:
push 0xffffffffffffffff
push 0x5a1b78
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6336a0]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x38]
lea eax, [esp + 0x14]
push eax
push 0x20019
xor ebx, ebx
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionInternet_Settings
push closesocket
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x515d59
mov ebx, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
lea esi, [esp + 0x20]
mov edi, str.ProxyEnable
call fcn.00497310
mov ebx, dword [esp + 0x1c]
add esp, 4
test eax, eax
je 0x515d59
cmp dword [esp + 0x1c], 4
jne 0x515d4a
mov edx, dword [ebx]
mov dword [ebp], edx
cmp dword [ebp], 0
je 0x515d61
mov dword [ebp], 5
jmp 0x515d61
mov dword [esp + 0x20], 0
test ebx, ebx
je 0x515d74
push ebx
call fcn.0055517b
add esp, 4
xor ebx, ebx
mov dword [esp + 0x18], ebx
call fcn.00555692
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x515d8e
push 0x80004005
call fcn.00401f90
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebp, [eax + 0x10]
mov dword [esp + 0x14], ebp
lea ecx, [esp + 0x24]
push ecx
push 0x20019
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionInternet_Settings
push closesocket
mov dword [esp + 0x44], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x515f5a
mov ebx, dword [esp + 0x24]
lea edx, [esp + 0x18]
push edx
lea esi, [esp + 0x20]
mov edi, str.ProxyServer
call fcn.00497310
add esp, 4
test eax, eax
je 0x515f56
mov eax, dword [esp + 0x1c]
test eax, eax
jbe 0x515f56
mov ebx, dword [esp + 0x18]
shr eax, 1
push eax
push ebx
lea ecx, [esp + 0x1c]
call fcn.004044f0
mov ebp, dword [esp + 0x14]
cmp dword [ebp - 0xc], 0
jl 0x515f5a
push str.http
push ebp
call fcn.0057781d
add esp, 8
test eax, eax
je 0x515eec
sub eax, ebp
sar eax, 1
mov esi, eax
js 0x515eec
cmp esi, dword [ebp - 0xc]
jg 0x515f5a
lea eax, [ebp + esi*2]
push 0x5e50f8
push eax
call fcn.0057781d
add esp, 8
test eax, eax
je 0x515f5a
sub eax, ebp
sar eax, 1
mov edi, eax
test edi, edi
jle 0x515f5a
mov ecx, edi
sub ecx, esi
sub ecx, 5
push ecx
add esi, 5
push esi
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x20]
call fcn.00423ae0
mov ecx, dword [esp + 0x3c]
push eax
mov byte [esp + 0x34], 1
call fcn.00402330
lea ecx, [esp + 0x24]
mov byte [esp + 0x30], 0
call fcn.00401f20
mov ecx, edi
mov edx, 0x602670
lea esi, [esp + 0x14]
call fcn.004145f0
test eax, eax
jge 0x515eb8
mov eax, dword [ebp - 0xc]
sub eax, edi
sub eax, 1
push eax
add edi, 1
push edi
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x20]
call fcn.00423ae0
mov eax, dword [eax]
push eax
call fcn.00577818
mov ecx, dword [esp + 0x44]
mov dword [ecx], eax
add esp, 4
lea ecx, [esp + 0x24]
call fcn.00401f20
jmp 0x515f5a
cmp dword [ebp - 0xc], 0
jl 0x515f5a
push 0x5e50f8
push ebp
call fcn.0057781d
add esp, 8
test eax, eax
je 0x515f5a
sub eax, ebp
sar eax, 1
mov esi, eax
test esi, esi
jle 0x515f5a
push esi
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x1c]
call fcn.00414630
mov ecx, dword [esp + 0x3c]
push eax
mov byte [esp + 0x34], 2
call fcn.00402330
lea ecx, [esp + 0x24]
mov byte [esp + 0x30], 0
call fcn.00401f20
mov eax, dword [ebp - 0xc]
sub eax, esi
sub eax, 1
push eax
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x1c]
call fcn.00401a60
jmp 0x515ed0
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x515f67
push ebx
call fcn.0055517b
add esp, 4
lea eax, [ebp - 0x10]
mov dword [esp + 0x30], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x515f8b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret