Function at 0x40ce78
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8d0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
xor esi, esi
cmp dword [ebp + 0x18], esi
push edi
je 0x40ce97
mov dword [ebp + 0xc], 0x1bb
jmp 0x40cea5
mov ax, word [ebx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov dword [ebp + 0xc], eax
and byte [ebp - 0x8d0], 0
mov edx, 0xff
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x8cf]
and byte [ebp - 0x4d0], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x4cf]
and byte [ebp - 0x90], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0xf
xor eax, eax
pop ecx
lea edi, [ebp - 0x8f]
rep stosd dword es:[edi], eax
and byte [ebp - 0x50], 0
push 0xf
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x4f]
and byte [ebp - 0xd0], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0xf
xor eax, eax
pop ecx
lea edi, [ebp - 0xcf]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [ebp + 0x14]
mov word [ebp - 0x10], 2
mov ax, word [edi + 6]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0xe], ax
mov eax, dword [edi + 2]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push 0x10
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40cf51
mov eax, 0xfffff830
jmp 0x40d221
push 0x40
lea eax, [ebp - 0x90]
push esi
push eax
call sub.MSVCRT.dll_memset
push 0x40
lea eax, [ebp - 0x50]
push esi
push eax
call sub.MSVCRT.dll_memset
push 0x40
lea eax, [ebp - 0xd0]
push esi
push eax
call sub.MSVCRT.dll_memset
mov esi, dword [sym.imp.MSVCRT.dll_strncpy]
lea eax, [edi + 8]
push 0x3f
push eax
lea eax, [ebp - 0x90]
push eax
call esi
lea eax, [edi + 0x108]
push 0x3f
push eax
lea eax, [ebp - 0x50]
push eax
call esi
add edi, 0x208
push 0x3f
lea eax, [ebp - 0xd0]
push edi
push eax
call esi
add esp, 0x48
lea eax, [ebp - 0xd0]
push eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x90]
push eax
call fcn.0040d226
add esp, 0xc
test eax, eax
jne 0x40cfdc
mov eax, 0xfffff836
jmp 0x40d221
mov esi, 0x400
xor edi, edi
push esi
lea eax, [ebp - 0x8d0]
push edi
push eax
mov dword [ebp + 0x18], esi
call sub.MSVCRT.dll_memset
push esi
lea eax, [ebp - 0x4d0]
push edi
push eax
call sub.MSVCRT.dll_memset
lea eax, [ebp + 0x18]
push eax
lea eax, [ebp - 0x8d0]
push eax
call fcn.0040d380
add esp, 0x20
test eax, eax
jne 0x40d035
mov eax, dword [0x415b90]
cmp eax, edi
je 0x40d0ae
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x415b90], edi
jmp 0x40d0ae
mov esi, dword [sym.imp.WS2_32.dll_inet_ntoa]
lea eax, [ebp - 0x8d0]
push eax
push 0x1bb
push dword [ebx + 4]
call esi
push eax
push 0x1bb
push dword [ebx + 4]
call esi
mov edi, dword [sym.imp.MSVCRT.dll__snprintf]
push eax
push str.CONNECT__s:_d_HTTP_1.1_r_nHost:__s:_d_r_nProxy_Authorization:_NTLM__s_r_nAccept:___r_nContent_Type:_text_html_r_nProxy_Connection:_Keep_Alive_r_nContent_length:_0_r_n_r_n
lea eax, [ebp - 0x4d0]
push 0x3ff
push eax
call edi
lea eax, [ebp - 0x4d0]
push eax
call sub.MSVCRT.dll_strlen
mov dword [ebp + 0x18], eax
push eax
lea eax, [ebp - 0x4d0]
push eax
push dword [ebp + 8]
call fcn.0040c6c2
add esp, 0x30
test eax, eax
jne 0x40d0b8
mov eax, dword [0x415b90]
test eax, eax
je 0x40d0ae
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
and dword [0x415b90], 0
mov eax, 0xfffff837
jmp 0x40d221
push 0x400
lea eax, [ebp - 0x4d0]
push 0
push eax
call sub.MSVCRT.dll_memset
lea eax, [ebp + 0x18]
push 0
push eax
lea eax, [ebp - 0x4d0]
push eax
mov dword [ebp + 0x18], 0x400
push dword [ebp + 8]
call fcn.0040c6e8
add esp, 0x1c
cmp dword [ebp + 0x18], 0
jle 0x40d125
mov eax, 0x400
mov dword [ebp + 0x18], eax
push eax
lea eax, [ebp - 0x8d0]
push 0
push eax
call sub.MSVCRT.dll_memset
lea eax, [ebp + 0x18]
push eax
lea eax, [ebp - 0x8d0]
push eax
lea eax, [ebp - 0x4d0]
push eax
call fcn.0040d426
add esp, 0x18
test eax, eax
jne 0x40d146
mov eax, dword [0x415b90]
test eax, eax
je 0x40d13c
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
and dword [0x415b90], 0
mov eax, 0xfffff838
jmp 0x40d221
movzx eax, word [ebp + 0xc]
lea ecx, [ebp - 0x8d0]
push ecx
push eax
push dword [ebx + 4]
call esi
push eax
movzx eax, word [ebp + 0xc]
push eax
push dword [ebx + 4]
call esi
push eax
push str.CONNECT__s:_d_HTTP_1.1_r_nHost:__s:_d_r_nProxy_Authorization:_NTLM__s_r_nAccept:___r_nContent_Type:_text_html_r_nProxy_Connection:_Keep_Alive_r_nContent_length:_0_r_n_r_n
lea eax, [ebp - 0x4d0]
push 0x3ff
push eax
call edi
lea eax, [ebp - 0x4d0]
push eax
call sub.MSVCRT.dll_strlen
mov dword [ebp + 0x18], eax
push eax
lea eax, [ebp - 0x4d0]
push eax
push dword [ebp + 8]
call fcn.0040c6c2
add esp, 0x30
test eax, eax
jne 0x40d1ba
mov eax, dword [0x415b90]
test eax, eax
je 0x40d1b3
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
and dword [0x415b90], 0
mov eax, 0xfffff839
jmp 0x40d221
mov esi, 0x400
xor edi, edi
push esi
lea eax, [ebp - 0x4d0]
push edi
push eax
call sub.MSVCRT.dll_memset
lea eax, [ebp + 0x18]
push edi
push eax
lea eax, [ebp - 0x4d0]
push eax
mov dword [ebp + 0x18], esi
push dword [ebp + 8]
call fcn.0040c6e8
add esp, 0x1c
cmp dword [ebp + 0x18], edi
jle 0x40d202
lea eax, [ebp - 0x4d0]
push eax
call fcn.0040cc8f
cmp eax, 0xc8
pop ecx
je 0x40d21f
mov eax, dword [0x415b90]
cmp eax, edi
je 0x40d218
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x415b90], edi
mov eax, 0xfffff83a
jmp 0x40d221
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret