Function at 0x5213b0
Capabilities:
Encode data using base64 via winapi
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5760bb
mov eax, dword fs:[0]
push eax
sub esp, 0x214
mov eax, dword [0x5d6b80]
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 eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
push 0xf0000000
push 1
push 0
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x210]
push 0
push eax
mov dword [ebp - 0x214], 0
mov dword [ebp - 0x210], 0
mov dword [ebp - 0x20c], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
lea eax, [ebp - 0x20c]
push eax
push 0
push 0
push 0x8004
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
mov edi, dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test eax, eax
jne 0x521450
push 0
push dword [ebp - 0x210]
call edi
push 0x1f3
lea eax, [ebp - 0x203]
mov byte [ebp - 0x204], 0
push 0
push eax
call fcn.00525ee0
push dword [esi]
lea eax, [ebp - 0x204]
push 0x1f4
push eax
call fcn.0052ce27
push dword [0x5d6950]
lea eax, [ebp - 0x204]
push 0x1f4
push eax
call fcn.0052ce7c
lea eax, [ebp - 0x204]
push 0x1f4
push eax
call fcn.00529687
add esp, 0x2c
push 0
push eax
lea eax, [ebp - 0x204]
push eax
push dword [ebp - 0x20c]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x5214cb
push eax
push dword [ebp - 0x210]
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
lea eax, [ebp - 0x220]
push 0
push eax
lea eax, [ebp - 0x208]
mov dword [ebp - 0x208], 0
push eax
push 4
push dword [ebp - 0x20c]
mov dword [ebp - 0x220], 4
call ebx
test eax, eax
je 0x521630
push dword [ebp - 0x208]
call fcn.005243ff
push dword [ebp - 0x208]
mov esi, eax
push 0
push esi
call fcn.00525ee0
add esp, 0x10
lea eax, [ebp - 0x208]
push 0
push eax
push esi
push 2
push dword [ebp - 0x20c]
call ebx
test eax, eax
je 0x521630
lea eax, [ebp - 0x218]
mov dword [ebp - 0x218], 0
push eax
push 0
push 1
push dword [ebp - 0x208]
push esi
call dword [sym.imp.CRYPT32.dll_CryptBinaryToStringA]
test eax, eax
je 0x521630
push dword [ebp - 0x218]
call fcn.005243ff
push dword [ebp - 0x218]
mov ebx, eax
push 0
push ebx
call fcn.00525ee0
add esp, 0x10
lea eax, [ebp - 0x218]
push eax
push ebx
push 1
push dword [ebp - 0x208]
push esi
call dword [sym.imp.CRYPT32.dll_CryptBinaryToStringA]
test eax, eax
je 0x521630
lea ecx, [ebp - 0x214]
call fcn.0045a530
push 0x5942f8
push ebx
push str.HTTP_1.1_101_Switching_Protocols_r_nUpgrade:_websocket_r_nConnection:_Upgrade_r_nSec_WebSocket_Accept:
lea eax, [ebp - 0x214]
mov dword [ebp - 4], 0
push str._s_s_s
push eax
call fcn.0049c260
mov esi, dword [ebp - 0x214]
add esp, 0x14
cmp dword [esi - 0xc], 0x1f4
jge 0x5215fc
push esi
push 0x1f4
push dword [ebp - 0x21c]
call fcn.0052ce27
add esp, 0xc
push ebx
call fcn.00525873
add esi, 0xfffffff0
mov dword [ebp - 0x214], 1
add esp, 4
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x521630
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push dword [ebp - 0x210]
call edi
push dword [ebp - 0x20c]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp - 0x214]
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.00525878
mov esp, ebp
pop ebp
ret