Function at 0x10017d80
Capabilities:
Connect socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1004e24c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x305c
call fcn.10036fa0
mov eax, dword [0x1005d330]
push ebx
push esi
push edi
mov dword [esp + 0x3064], eax
mov ebx, ecx
call dword [0x1005c0e0]
call fcn.10045d33
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
mov dword [esp + 0x3074], 0
call fcn.10045d33
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x3074], 1
call fcn.10045d33
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
mov byte [esp + 0x3074], 2
call fcn.10045d33
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea edi, [eax + 0x10]
mov dword [esp + 0x1c], edi
mov esi, dword [ebp + 0x14]
test esi, esi
mov byte [esp + 0x3074], 3
je 0x10017e83
mov edi, dword [esi]
lea eax, [esi + 4]
push eax
lea ecx, [esp + 0x18]
call fcn.10008ec0
mov ecx, dword [esi + 8]
lea edx, [esi + 0xc]
mov dword [esp + 0x24], ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.10008ec0
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x18]
push ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], eax
call fcn.10008ec0
lea edx, [esi + 0x1c]
push edx
lea ecx, [esp + 0x20]
call fcn.10008ec0
test edi, edi
jne 0x10018054
mov edi, dword [esp + 0x1c]
mov esi, dword [sym.imp.WS2_32.dll_htons]
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov ebx, 2
push eax
mov dword [esp + 0x38], eax
mov word [esp + 0x2c], bx
call esi
mov ecx, dword [ebp + 0x18]
push 0x10
lea edx, [esp + 0x2c]
mov word [esp + 0x2e], ax
mov eax, dword [ebp + 8]
push edx
push eax
mov dword [esp + 0x38], ecx
call dword [sym.imp.WS2_32.dll_bind]
xor ecx, ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
mov word [esp + 0x28], bx
mov ebx, dword [ebp + 0xc]
mov dword [esp + 0x30], ecx
push ebx
mov dword [esp + 0x38], ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edx, dword [ebp + 0x10]
push edx
mov dword [esp + 0x30], eax
call esi
mov word [esp + 0x2a], ax
mov eax, dword [esp + 0x2c]
or esi, 0xffffffff
cmp eax, esi
jne 0x10017fa6
push ebx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x10017f9b
add edi, 0xfffffff0
mov byte [esp + 0x3074], 2
lea eax, [edi + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10017f34
mov ecx, dword [edi]
mov edx, dword [ecx]
push edi
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x3074], 1
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10017f59
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x3074], 0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10017f7e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x3074], esi
lea ecx, [eax + 0xc]
lock xadd dword [ecx], esi
dec esi
test esi, esi
jmp 0x10018159
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov dword [esp + 0x2c], edx
mov ecx, dword [ebp + 8]
push 0x10
lea eax, [esp + 0x2c]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
add edi, 0xfffffff0
test eax, eax
mov byte [esp + 0x3074], 2
je 0x10017fd7
lea edx, [edi + 0xc]
mov eax, esi
lock xadd dword [edx], eax
dec eax
test eax, eax
jmp 0x10017f2a
lea eax, [edi + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10017fed
mov ecx, dword [edi]
mov edx, dword [ecx]
push edi
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x3074], 1
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10018012
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x3074], 0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10018037
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x3074], esi
lea ecx, [eax + 0xc]
lock xadd dword [ecx], esi
dec esi
test esi, esi
jmp 0x10018282
xor eax, eax
mov byte [esp + 0x48], 0
mov ecx, 0x400
lea edi, [esp + 0x49]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x24]
push eax
mov word [esp + 0x3c], 2
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x14]
push ecx
mov word [esp + 0x3e], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [esp + 0x3c], eax
jne 0x100180af
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x1001816c
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [esp + 0x3c], ecx
mov edi, dword [ebp + 8]
push 0x10
lea eax, [esp + 0x3c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x100181e6
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x3074], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100180ee
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x3074], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10018114
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x3074], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x1001813a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x3074], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x1001840e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
jmp 0x1001840e
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x3074], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x10018192
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x3074], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100181b8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x3074], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100181de
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [edi - 0x10]
jmp 0x10018141
mov eax, dword [esi + 0x24]
test eax, eax
je 0x10018296
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x3074], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10018217
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x3074], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x1001823d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x3074], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10018263
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x3074], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x1001828c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 1
jmp 0x10018410
mov esi, dword [esp + 0x18]
push str.HTTPS
push esi
call fcn.100380d7
add esp, 8
test eax, eax
je 0x1001855b
push str.HTTP
push esi
call fcn.100380d7
add esp, 8
test eax, eax
je 0x1001855b
push str.SOCKS5
push esi
call fcn.100380d7
add esp, 8
test eax, eax
jne 0x100183ea
mov eax, dword [esp + 0x20]
test eax, eax
mov byte [esp + 0x4a], 0
mov byte [esp + 0x48], 5
je 0x10018433
push 4
lea eax, [esp + 0x4c]
push eax
push edi
mov ecx, ebx
mov byte [esp + 0x55], 2
mov byte [esp + 0x57], 2
call fcn.10017640
push 8
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x50]
push edx
push edi
mov ecx, ebx
mov dword [esp + 0x30], 2
call fcn.10017520
cmp byte [esp + 0x48], 5
jne 0x100183ea
mov al, byte [esp + 0x49]
cmp al, 2
jne 0x100183e2
mov edi, dword [esp + 0x10]
mov eax, edi
mov byte [esp + 0x48], 1
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10018350
sub eax, edx
mov edx, eax
lea esi, [esp + 0x4a]
mov byte [esp + 0x49], dl
mov eax, edi
sub esi, edi
mov cl, byte [eax]
mov byte [esi + eax], cl
inc eax
test cl, cl
jne 0x10018367
mov edi, dword [esp + 0x1c]
mov ecx, edi
add edx, 2
lea esi, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10018380
sub ecx, esi
lea esi, [esp + edx + 0x49]
mov byte [esp + edx + 0x48], cl
mov ecx, edi
sub esi, edi
mov al, byte [ecx]
mov byte [esi + ecx], al
inc ecx
test al, al
jne 0x10018395
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100183a4
mov edi, dword [ebp + 8]
sub eax, esi
lea eax, [eax + edx + 1]
push eax
lea ecx, [esp + 0x4c]
push ecx
push edi
mov ecx, ebx
call fcn.10017640
push 8
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x50]
push eax
push edi
mov ecx, ebx
mov dword [esp + 0x30], 2
call fcn.10017520
mov al, byte [esp + 0x49]
test al, al
je 0x10018476
lea ecx, [esp + 0x1c]
call fcn.10002590
lea ecx, [esp + 0x10]
call fcn.10002590
lea ecx, [esp + 0x18]
call fcn.10002590
lea ecx, [esp + 0x14]
call fcn.10002590
xor eax, eax
mov ecx, dword [esp + 0x306c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x3064]
call fcn.10036c09
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
push 3
lea ecx, [esp + 0x4c]
push ecx
push edi
mov ecx, ebx
mov byte [esp + 0x55], 1
call fcn.10017640
push 8
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x50]
push eax
push edi
mov ecx, ebx
mov dword [esp + 0x30], 2
call fcn.10017520
cmp byte [esp + 0x48], 5
jne 0x100183ea
mov al, byte [esp + 0x49]
test al, al
jne 0x100183ea
mov esi, dword [ebp + 0xc]
mov eax, esi
mov byte [esp + 0x48], 5
mov byte [esp + 0x49], 1
mov byte [esp + 0x4a], 0
mov byte [esp + 0x4b], 3
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10018492
sub eax, edx
lea edx, [esp + 0x4d]
mov byte [esp + 0x4c], al
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x100184a7
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, esi
lea edx, [ecx + 1]
mov dword [esp + 0x24], edx
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x100184c4
sub ecx, dword [esp + 0x24]
mov word [esp + ecx + 0x4d], ax
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100184e0
sub eax, edx
add eax, 7
push eax
lea eax, [esp + 0x4c]
push eax
push edi
mov ecx, ebx
call fcn.10017640
push 8
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x50]
push edx
push edi
mov ecx, ebx
mov dword [esp + 0x30], 0xa
call fcn.10017520
cmp byte [esp + 0x48], 5
jne 0x100183ea
mov al, byte [esp + 0x49]
test al, al
jne 0x100183ea
lea ecx, [esp + 0x1c]
call fcn.10002590
lea ecx, [esp + 0x10]
call fcn.10002590
lea ecx, [esp + 0x18]
call fcn.10002590
lea ecx, [esp + 0x14]
call fcn.10002590
mov eax, 1
jmp 0x10018410
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push esi
push eax
lea ecx, [esp + 0x50]
push str.CONNECT__s:_d_HTTP_1.0_r_n_r_n
push ecx
call fcn.10036e11
mov eax, dword [esp + 0x30]
add esp, 0x10
test eax, eax
je 0x1001861f
mov edx, dword [esp + 0x1c]
xor eax, eax
mov byte [esp + 0x2058], 0
mov ecx, 0x400
lea edi, [esp + 0x2059]
rep stosd dword es:[edi], eax
mov byte [esp + 0x1050], al
mov ecx, 0x400
lea edi, [esp + 0x1051]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
push edx
push eax
lea ecx, [esp + 0x1058]
push str._s:_s
push ecx
call fcn.10036e11
lea eax, [esp + 0x1060]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100185d7
sub eax, edx
push 0x1001
lea edx, [esp + 0x205c]
push edx
push eax
lea eax, [esp + 0x105c]
push eax
mov ecx, ebx
call fcn.10017010
mov edx, dword [ebp + 0xc]
lea ecx, [esp + 0x2058]
push ecx
push esi
push edx
lea eax, [esp + 0x54]
push str.CONNECT__s:_d_HTTP_1.0_r_nProxy_Authorization:_Basic__s_r_n_r_n
push eax
call fcn.10036e11
mov edi, dword [ebp + 8]
add esp, 0x14
lea ecx, [esp + 0x48]
push ecx
push edi
mov ecx, ebx
call fcn.10017670
push 0x1000
lea edx, [esp + 0x4c]
push edx
push edi
mov ecx, ebx
call fcn.10017210
push 0xc
lea eax, [esp + 0x4c]
push str.HTTP_1.0_200
push eax
call fcn.10040b84
add esp, 0xc
test eax, eax
je 0x10018672
push 0xc
lea ecx, [esp + 0x4c]
push str.HTTP_1.1_200
push ecx
call fcn.10040b84
add esp, 0xc
test eax, eax
jne 0x1001852d
mov eax, dword [ebx + 0x110]
test eax, eax
je 0x100183ea
jmp 0x10018685
mov edi, dword [ebp + 8]
push 0x1000
lea edx, [esp + 0x4c]
push edx
push edi
mov ecx, ebx
call fcn.10017210
test eax, eax
jle 0x100183ea
mov edi, 0x100506d0
lea esi, [esp + 0x48]
mov ecx, 3
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x1001852d
mov eax, dword [ebx + 0x110]
test eax, eax
jne 0x10018682
jmp 0x100183ea