Function at 0x428520
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc0
mov eax, dword [0x53de10]
xor eax, esp
mov dword [esp + 0xbc], eax
push ebx
push ebp
mov ebp, dword [esp + 0xcc]
movsx ecx, byte [ebp + 0x16d]
mov eax, dword [ebp + 0xe8]
push esi
shl ecx, 6
mov edx, dword [ecx + eax + 0x54]
push edi
xor edi, edi
mov ebx, 0x2000
test dword [ebp + 0x160], ebx
mov dword [esp + 0x44], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x30], 0x3ea
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x40], 1
jne 0x4285b1
mov esi, dword [ebp]
push 0xe0
push edi
push ebp
call fcn.004bbbe0
add esp, 0xc
mov byte [ebp + 0x166], 3
mov byte [ebp + 0x167], 6
mov dword [ebp], esi
mov eax, dword [ebp]
mov dword [ebp + 0x28], 1
movzx ecx, byte [eax + 0x427]
cmp ecx, edi
jne 0x4285ca
xor esi, esi
jmp 0x4285d5
lea ecx, [ecx + ecx*2]
movzx esi, word [eax + ecx*2 + 8]
add esi, dword [eax + 4]
test dword [ebp + 0x160], ebx
mov dword [esp + 0x14], esi
jne 0x428606
cmp esi, edi
jne 0x428610
movzx ecx, byte [eax + 0x467]
cmp ecx, edi
jne 0x4285f4
xor esi, esi
jmp 0x4285ff
lea edx, [ecx + ecx*2]
movzx esi, word [eax + edx*2 + 8]
add esi, dword [eax + 4]
mov dword [esp + 0x14], esi
mov dword [ebp + 0x28], edi
cmp esi, edi
je 0x4290ad
xor edi, edi
push esi
call fcn.004b941e
add esp, 4
cmp eax, 0x12d
mov dword [esp + 0x18], eax
je 0x428ffb
cmp eax, 0x12e
je 0x428ffb
cmp eax, 0x12f
je 0x428ffb
cmp eax, 0x133
je 0x428ffb
cmp eax, 0x134
je 0x428ffb
test dword [ebp + 0x160], ebx
jne 0x428815
cmp eax, 0xc8
je 0x42867f
push eax
push str.Connection_failed_with_code__d
mov esi, 4
call fcn.004214d0
add esp, 8
jmp 0x4290b5
mov ebx, ebp
call fcn.00421290
test eax, eax
je 0x4286a1
push str.Problem_allocating_wsi_user_mem_n
mov esi, 1
call fcn.004214d0
add esp, 4
jmp 0x4290b5
and dword [ebp + 0x160], 0xffffbfff
mov ebx, dword [ebp + 0x160]
xor esi, esi
push 0x44
mov ecx, ebp
mov dword [ebp + 0x158], esi
call fcn.00424560
add esp, 4
test eax, eax
je 0x42870d
mov eax, dword [ebp]
movzx ecx, byte [eax + 0x45c]
cmp ecx, esi
je 0x4286e2
lea ecx, [ecx + ecx*2]
movzx esi, word [eax + ecx*2 + 8]
add esi, dword [eax + 4]
xor edx, edx
mov edi, str.chunked
mov ecx, 8
repe cmpsb byte [esi], byte es:[edi]
mov eax, edx
sete al
mov byte [ebp + 0x16e], dl
shl eax, 0xe
xor eax, ebx
and eax, 0x4000
xor eax, ebx
mov dword [ebp + 0x160], eax
push 0x1b
mov ecx, ebp
call fcn.00424560
add esp, 4
test eax, eax
je 0x428762
mov ecx, dword [ebp]
movzx eax, byte [ecx + 0x433]
test eax, eax
je 0x428736
lea edx, [eax + eax*2]
movzx eax, word [ecx + edx*2 + 8]
add eax, dword [ecx + 4]
push eax
call fcn.004b941e
add esp, 4
push eax
push str.lws_client_interpret_server_handshake
push str._s:_incoming_content_length__d_n
mov esi, 4
mov dword [ebp + 0x2c], eax
call fcn.004214d0
mov eax, dword [ebp + 0x2c]
add esp, 0xc
mov dword [ebp + 0x30], eax
jmp 0x428775
test dword [ebp + 0x160], 0x4000
jne 0x428775
mov dword [ebp + 0x28], 0
mov edx, dword [ebp + 0x110]
mov ecx, dword [ebp + 0xfc]
mov eax, dword [ecx + 4]
push 0
push 0
push edx
push 2
push ebp
call eax
add esp, 0x14
test eax, eax
jne 0x4290b5
push eax
xor ebx, ebx
mov esi, ebp
call fcn.00420a20
mov ecx, dword [ebp + 0x160]
mov eax, dword [ebp + 0x110]
mov edx, dword [ebp + 0xfc]
add esp, 4
push ebx
push ebx
and ecx, 0xffffffbf
push eax
or ecx, 0x20
mov dword [ebp + 0x160], ecx
mov ecx, dword [edx + 4]
push 0x2c
push ebp
call ecx
add esp, 0x14
test eax, eax
jne 0x4290ad
push eax
mov eax, ebp
call fcn.00424370
add esp, 4
push str.lws_client_interpret_server_handshake
push str._s:_client_connection_up_n
lea esi, [ebx + 4]
call fcn.004214d0
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0xcc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b883d
add esp, 0xc0
ret
push 0xd
mov ecx, ebp
call fcn.00424560
add esp, 4
test eax, eax
jne 0x428832
mov dword [esp + 0x3c], 1
jmp 0x4290ad
cmp esi, edi
je 0x428862
push 3
push 0x533618
push esi
call fcn.004b9329
add esp, 0xc
test eax, eax
je 0x428862
push esi
push str.lws_client_handshake:_got_bad_HTTP_response__s_n
mov esi, 2
call fcn.004214d0
add esp, 8
jmp 0x4290ad
mov eax, dword [ebp]
movzx ecx, byte [eax + 0x41d]
cmp ecx, edi
jne 0x428879
mov dword [esp + 0x14], edi
jmp 0x4290ad
lea edx, [ecx + ecx*2]
movzx ecx, word [eax + edx*2 + 8]
add ecx, dword [eax + 4]
mov dword [esp + 0x14], ecx
je 0x4290ad
mov ebx, ecx
mov eax, ebx
call fcn.004284f0
mov edi, str.websocket
mov esi, ebx
mov ecx, 0xa
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4288bf
push ebx
push str.lws_client_handshake:_got_bad_Upgrade_header__s_n
lea esi, [eax + 2]
call fcn.004214d0
add esp, 8
jmp 0x4290ad
mov eax, dword [ebp]
movzx ecx, byte [eax + 0x41c]
test ecx, ecx
jne 0x4288d6
mov dword [esp + 0x14], ecx
jmp 0x4290ad
lea ecx, [ecx + ecx*2]
movzx ecx, word [eax + ecx*2 + 8]
add ecx, dword [eax + 4]
mov dword [esp + 0x14], ecx
je 0x4290ad
mov ebx, ecx
mov eax, ebx
call fcn.004284f0
mov edi, str.upgrade
mov esi, ebx
mov ecx, 8
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x42891c
push ebx
push str.lws_client_int_s_hs:_bad_header__s_n
lea esi, [edx + 2]
call fcn.004214d0
add esp, 8
jmp 0x4290ad
mov edi, dword [ebp]
movzx eax, byte [edi + 0x468]
test eax, eax
jne 0x42892e
xor esi, esi
jmp 0x428939
lea eax, [eax + eax*2]
movzx esi, word [edi + eax*2 + 8]
add esi, dword [edi + 4]
push 0xc
mov ecx, ebp
call fcn.00424560
add esp, 4
test eax, eax
jne 0x4289a6
mov ecx, dword [ebp + 0xec]
mov edx, dword [ecx + 0x118]
mov dword [ebp + 0xfc], edx
push 9
mov ecx, ebp
call fcn.00424560
add esp, 4
test eax, eax
je 0x428d78
mov esi, dword [esp + 0x28]
push 0x1000
push esi
push ebp
mov eax, 9
call fcn.004245a0
add esp, 0xc
test eax, eax
jge 0x428b03
push str.ext_list_from_server_failed_to_copy_n
mov esi, 2
call fcn.004214d0
add esp, 4
jmp 0x4290b5
movzx eax, byte [edi + 0x424]
test eax, eax
je 0x4289bc
lea eax, [eax + eax*2]
movzx eax, word [edi + eax*2 + 8]
add eax, dword [edi + 4]
mov dword [esp + 0x14], eax
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4289c3
sub eax, edx
test esi, esi
mov edi, eax
je 0x428a34
mov ebx, dword [esp + 0x44]
cmp byte [esi], 0
je 0x428a30
test ebx, ebx
jne 0x428a50
mov ecx, dword [esp + 0x14]
push edi
push ecx
push esi
call fcn.004b9329
add esp, 0xc
test eax, eax
jne 0x428a06
mov al, byte [edi + esi]
cmp al, 0x2c
je 0x4289ff
test al, al
jne 0x428a06
mov ebx, 1
jmp 0x4289d8
mov al, byte [esi]
test al, al
je 0x4289d8
add esi, 1
cmp al, 0x2c
jne 0x428a06
mov al, byte [esi]
test al, al
je 0x4289d8
lea esp, [esp]
cmp al, 0x20
jne 0x4289d8
mov al, byte [esi + 1]
add esi, 1
test al, al
jne 0x428a20
jmp 0x4289d8
test ebx, ebx
jne 0x428a50
mov edx, dword [esp + 0x14]
push edx
push str.lws_client_int_s_hs:_got_bad_protocol__s_n
mov esi, 1
call fcn.004214d0
add esp, 8
jmp 0x4290b5
mov edi, dword [ebp + 0xec]
xor esi, esi
mov dword [esp + 0x18], esi
mov dword [ebp + 0xfc], esi
mov eax, dword [edi + 0x118]
cmp dword [eax + 4], esi
je 0x428ada
lea ecx, [ecx]
mov edx, dword [edi + 0x118]
mov eax, dword [esp + 0x14]
lea ecx, [esi + esi*2]
mov ecx, dword [edx + ecx*8]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x428aa0
test dl, dl
je 0x428a9c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x428aa0
add eax, 2
add ecx, 2
test dl, dl
jne 0x428a80
xor eax, eax
jmp 0x428aa5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x428ac8
mov eax, dword [ebp + 0xec]
add esi, 1
mov dword [esp + 0x18], esi
mov edx, dword [eax + 0x118]
lea ecx, [esi + esi*2]
cmp dword [edx + ecx*8 + 4], 0
jne 0x428a70
jmp 0x428ada
mov ecx, dword [edi + 0x118]
lea eax, [esi + esi*2]
lea edx, [ecx + eax*8]
mov dword [ebp + 0xfc], edx
cmp dword [ebp + 0xfc], 0
jne 0x42895b
mov eax, dword [esp + 0x14]
push eax
push str.lws_client_int_s_hs:_fail_protocol__s_n
mov esi, 1
call fcn.004214d0
add esp, 8
jmp 0x4290b5
xor ecx, ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], ecx
mov byte [esp + 0x1f], cl
xor ebx, ebx
jmp 0x428b19
mov esi, dword [esp + 0x20]
mov al, byte [esi]
test al, al
je 0x428b66
cmp al, 0x2c
je 0x428b66
cmp al, 9
je 0x428b66
cmp al, 0x3b
jne 0x428b41
test ebx, ebx
mov byte [esp + 0x1f], 1
jne 0x428b37
lea ebx, [esi + 1]
add dword [esp + 0x20], 1
jmp 0x428d6d
cmp byte [esp + 0x1f], 0
jne 0x428b37
cmp al, 0x20
je 0x428b37
add dword [esp + 0x20], 1
cmp ecx, 0x7f
mov byte [esp + ecx + 0x48], al
jae 0x428d6d
add ecx, 1
jmp 0x428d69
mov byte [esp + ecx + 0x48], 0
cmp byte [esi], 0
mov byte [esp + 0x1f], 0
jne 0x428b7f
mov dword [esp + 0x40], 0
jmp 0x428b8e
add esi, 1
test ecx, ecx
mov dword [esp + 0x20], esi
je 0x428d6d
lea ecx, [esp + 0x48]
push ecx
push str.checking_client_ext__s_n
mov esi, 4
call fcn.004214d0
mov edx, dword [ebp + 0xec]
mov dword [esp + 0x20], 0
mov edi, dword [edx + 0x130]
add esp, 8
test edi, edi
je 0x428de6
cmp dword [edi + 4], 0
je 0x428d5a
mov ecx, dword [edi]
lea eax, [esp + 0x48]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x428bf1
test dl, dl
je 0x428bed
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x428bf1
add eax, 2
add ecx, 2
test dl, dl
jne 0x428bd1
xor eax, eax
jmp 0x428bf6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x428d4f
lea eax, [esp + 0x48]
push eax
push str.instantiating_client_ext__s_n
mov esi, 4
mov dword [esp + 0x20], 1
call fcn.004214d0
movzx ecx, byte [ebp + 0x164]
mov dword [ebp + ecx*4 + 0x11c], edi
movzx ecx, byte [ebp + 0x164]
mov eax, dword [ebp + 0xe8]
push 0
lea edx, [esp + 0x40]
push edx
lea edx, [ebp + ecx*4 + 0x124]
push edx
push 5
push ebp
push edi
push eax
mov eax, dword [edi + 4]
call eax
add esp, 0x24
test eax, eax
je 0x428c6c
lea ecx, [esp + 0x48]
push ecx
push str._ext__s_failed_construction_n
call fcn.004214d0
add esp, 8
jmp 0x428d4f
mov edx, dword [ebp + 0xfc]
mov byte [esp + 0x48], 0
mov ecx, dword [edx + 4]
mov eax, dword [edi]
push 0x80
lea edx, [esp + 0x4c]
push edx
push eax
push 0x27
push ebp
call ecx
add esp, 0x14
test eax, eax
jne 0x4290b5
mov eax, ebp
call fcn.00421120
test eax, eax
jne 0x4290b5
cmp byte [esp + 0x48], al
je 0x428ce9
lea eax, [esp + 0x48]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x428cb3
lea ecx, [esp + 0x48]
push ecx
movzx ecx, byte [ebp + 0x164]
sub eax, edx
mov edx, dword [esp + 0x38]
push edx
mov edx, dword [ebp + ecx*4 + 0x124]
push edx
push ebp
push edi
call fcn.00426fe0
add esp, 0x14
test eax, eax
jne 0x428d8d
test ebx, ebx
je 0x428d1a
mov ecx, dword [esp + 0x34]
movzx edx, byte [ebp + 0x164]
mov eax, dword [esp + 0x20]
push ebx
push ecx
mov ecx, dword [ebp + edx*4 + 0x124]
push ecx
push ebp
sub eax, ebx
push edi
call fcn.00426fe0
add esp, 0x14
test eax, eax
jne 0x428dae
movzx edx, byte [ebp + 0x164]
mov ecx, dword [ebp + edx*4 + 0x124]
mov eax, dword [ebp + 0xe8]
mov edx, dword [edi + 4]
push 0
push 0
push ecx
push 0x19
push ebp
push edi
push eax
call edx
add esp, 0x1c
test eax, eax
jne 0x428dcb
add byte [ebp + 0x164], 1
add edi, 0xc
test edi, edi
jne 0x428bc1
cmp dword [esp + 0x18], 0
je 0x428de6
xor ebx, ebx
xor ecx, ecx
mov dword [esp + 0x18], ecx
cmp dword [esp + 0x40], 0
jne 0x428b15
mov eax, dword [ebp]
movzx ecx, byte [eax + 0x425]
test ecx, ecx
jne 0x428e02
xor esi, esi
jmp 0x428e0d
lea eax, [esp + 0x48]
push eax
push str.lws_client_interpret_server_handshake
push str._s:_unable_to_parse_user_defaults__s
mov esi, 1
call fcn.004214d0
add esp, 0xc
jmp 0x4290b5
push ebx
push str.lws_client_interpret_server_handshake
push str._s:_unable_to_parse_remote_def__s
mov esi, 1
call fcn.004214d0
add esp, 0xc
jmp 0x4290b5
mov ecx, dword [edi]
push ebx
push ecx
push str._s:_ext__s_rejects_server_options__s
mov esi, 1
call fcn.004214d0
add esp, 0xc
jmp 0x4290b5
lea edx, [esp + 0x48]
push edx
push str.Unknown_ext__s__n
mov esi, 2
call fcn.004214d0
add esp, 8
jmp 0x4290b5
lea ecx, [ecx + ecx*2]
movzx esi, word [eax + ecx*2 + 8]
add esi, dword [eax + 4]
lea edi, [eax + 0xc78]
mov dword [esp + 0x14], esi
mov ecx, edi
mov eax, esi
jmp 0x428e20
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x428e40
test dl, dl
je 0x428e3c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x428e40
add eax, 2
add ecx, 2
test dl, dl
jne 0x428e20
xor eax, eax
jmp 0x428e45
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x428e62
push edi
push esi
push str.lws_client_int_s_hs:_accept__s_wrong_vs__s_n
mov esi, 2
call fcn.004214d0
add esp, 0xc
jmp 0x4290b5
mov ebx, ebp
call fcn.00421290
test eax, eax
jne 0x42868a
mov edx, dword [ebp + 0xfc]
mov ecx, dword [edx + 4]
push eax
push eax
mov eax, dword [ebp + 0x110]
push eax
push 2
push ebp
call ecx
add esp, 0x14
test eax, eax
jne 0x4290b5
push eax
xor ebx, ebx
mov esi, ebp
call fcn.00420a20
add esp, 4
push ebx
mov eax, ebp
call fcn.00424370
add esp, 4
push 0xe0
push ebx
push ebp
call fcn.004bbbe0
mov edx, dword [ebp + 0x160]
mov eax, dword [ebp + 0xfc]
and edx, 0xffffffbf
or edx, 0x20
mov byte [ebp + 0x166], 6
mov byte [ebp + 0x167], 5
mov dword [ebp + 0x160], edx
mov eax, dword [eax + 0xc]
add esp, 0xc
test eax, eax
jne 0x428eec
mov eax, 0x1000
add eax, 0x10
mov dword [esp + 0x18], eax
add eax, 4
push eax
push 0
call dword [0x543a94]
add esp, 8
test eax, eax
mov dword [ebp + 0x28], eax
jne 0x428f23
mov ecx, dword [esp + 0x18]
push ecx
push str.Out_of_Mem_allocating_rx_buffer__d_n
lea esi, [eax + 1]
call fcn.004214d0
add esp, 8
jmp 0x4290b5
mov ecx, dword [ebp + 0x13c]
mov edx, dword [esp + 0x18]
push 4
lea eax, [esp + 0x1c]
push eax
push 0x1001
push 0xffff
push ecx
mov dword [ebp + 0x2c], edx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x428f68
mov edx, dword [esp + 0x18]
push edx
push str.Failed_to_set_SNDBUF_to__d
mov esi, 2
call fcn.004214d0
add esp, 8
jmp 0x4290ad
mov ecx, dword [ebp + 0x110]
mov eax, dword [ebp + 0xfc]
mov edx, dword [eax + 4]
push 0
push 0
push ecx
push 3
push ebp
call edx
add esp, 0x14
test eax, eax
jne 0x4290ad
mov eax, dword [ebp + 0xec]
mov esi, dword [eax + 0x130]
test esi, esi
je 0x4287fa
mov edi, dword [esp + 0x24]
cmp dword [esi + 4], ebx
je 0x4287fa
xor eax, eax
xor ecx, ecx
cmp byte [ebp + 0x164], bl
mov dword [esp + 0x18], eax
jbe 0x428fdf
movzx edx, byte [ebp + 0x164]
cmp dword [ebp + eax*4 + 0x11c], esi
jne 0x428fd4
mov ecx, dword [ebp + eax*4 + 0x124]
add eax, 1
cmp eax, edx
mov dword [esp + 0x18], eax
jl 0x428fc4
push 0
push 0
push ecx
mov ecx, dword [esi + 4]
push 0xa
push ebp
push esi
push edi
call ecx
add esp, 0x1c
add esi, 0xc
jne 0x428fa4
jmp 0x4287fa
mov eax, dword [ebp]
movzx ecx, byte [eax + 0x453]
cmp ecx, edi
jne 0x429012
mov dword [esp + 0x14], edi
jmp 0x4290ad
lea edx, [ecx + ecx*2]
movzx ecx, word [eax + edx*2 + 8]
add ecx, dword [eax + 4]
mov dword [esp + 0x14], ecx
je 0x4290ad
lea eax, [esp + 0x28]
push eax
lea edx, [esp + 0x24]
push edx
push ecx
lea ebx, [esp + 0x38]
lea eax, [esp + 0x30]
call fcn.00421570
add esp, 0xc
test eax, eax
jne 0x4290ad
mov eax, dword [esp + 0x24]
mov edi, str.wss:__
mov esi, eax
mov ecx, 7
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x42906e
mov esi, eax
mov edi, str.https:__
mov ecx, 9
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x429076
mov dword [esp + 0x38], 1
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
push ebx
push ecx
push edx
mov edi, ebp
call fcn.0042a250
add esp, 0xc
test eax, eax
je 0x4287fa
push str.Redirect_failed_n
mov esi, 1
call fcn.004214d0
add esp, 4
mov dword [esp + 0x30], 0
mov edx, dword [ebp + 0xfc]
test edx, edx
je 0x429105
cmp byte [ebp + 0x167], 5
jne 0x429105
cmp dword [esp + 0x3c], 0
je 0x4290ef
mov esi, dword [esp + 0x14]
test esi, esi
je 0x4290ef
mov eax, esi
lea edi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4290e0
sub eax, edi
push eax
push esi
jmp 0x4290f3
push 0
push 0
mov eax, dword [ebp + 0x110]
mov ecx, dword [edx + 4]
push eax
push 1
push ebp
call ecx
add esp, 0x14
mov edx, dword [esp + 0x30]
push edx
push ebp
call fcn.00420ae0
add esp, 8
mov eax, 1
jmp 0x4287fc