Function at 0x10037520
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Set socket configuration

Disassembly:
mov eax, 0x34
call fcn.10086e00
mov eax, dword [0x100c4300]
push ebx
or ebx, 0xffffffff
push esi
test eax, eax
push edi
mov dword [esp + 0x14], 0
jne 0x100375a7
mov ecx, 0x64
xor eax, eax
mov edi, 0x100c4170
push 0x100c4170
rep stosd dword es:[edi], eax
push 0x101
mov dword [0x100c4300], 1
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x100375a7
call sub.WSOCK32.dll_WSAGetLastError
push 0x1d0
push str..crypto_bio_b_sock.c
push eax
push 9
push 2
call sym.LIBEAY32.dll_ERR_put_error
push 0x1d1
push str..crypto_bio_b_sock.c
push 0x7a
push 0x70
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x28
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x34
ret
mov eax, dword [esp + 0x44]
push eax
call sym.LIBEAY32.dll_BUF_strdup
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0xc], esi
jne 0x100375c8
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x34
ret
mov cl, byte [esi]
push ebp
xor edx, edx
mov ebp, esi
test cl, cl
mov dword [esp + 0x14], ebp
mov eax, esi
je 0x100375fe
mov cl, byte [eax]
cmp cl, 0x3a
jne 0x100375e8
lea edx, [eax + 1]
mov byte [eax], 0
jmp 0x100375ed
cmp cl, 0x2f
je 0x100375f7
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x100375d9
jmp 0x100375fa
mov byte [eax], 0
test edx, edx
jne 0x1003760c
mov dword [esp + 0x14], 0x10093a10
mov edx, esi
mov ebp, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ecx
push edx
call sym.LIBEAY32.dll_BIO_get_port
add esp, 8
test eax, eax
je 0x100378a7
mov eax, dword [esp + 0x1c]
xor edx, edx
mov dword [esp + 0x24], edx
push eax
mov dword [esp + 0x2c], edx
mov word [esp + 0x28], 2
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
call sub.WSOCK32.dll_htons
mov edi, 0x10093a10
mov esi, ebp
mov ecx, 2
xor edx, edx
mov word [esp + 0x26], ax
repe cmpsb byte [esi], byte es:[edi]
jne 0x10037662
mov dword [esp + 0x28], edx
jmp 0x100376b1
lea eax, [esp + 0x1c]
push eax
push ebp
call sym.LIBEAY32.dll_BIO_get_host_ip
add esp, 8
test eax, eax
je 0x100378a3
mov edx, dword [esp + 0x1d]
mov eax, dword [esp + 0x1e]
xor ecx, ecx
and edx, 0xff
mov ch, byte [esp + 0x1c]
and eax, 0xff
or ecx, edx
mov edx, dword [esp + 0x1f]
shl ecx, 8
or ecx, eax
and edx, 0xff
shl ecx, 8
or ecx, edx
push ecx
call sub.WSOCK32.dll_htonl
mov dword [esp + 0x28], eax
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
mov ebx, eax
cmp ebx, 0xffffffff
je 0x100377b5
mov esi, dword [esp + 0x4c]
cmp esi, 2
jne 0x100376f2
lea eax, [esp + 0x4c]
push 4
push eax
push 4
push 0xffff
push ebx
mov dword [esp + 0x60], 1
call sub.WSOCK32.dll_setsockopt
mov dword [esp + 0x18], eax
xor esi, esi
lea ecx, [esp + 0x24]
push 0x10
push ecx
push ebx
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x10037845
call sub.WSOCK32.dll_WSAGetLastError
cmp esi, 1
mov ebp, eax
jne 0x10037801
cmp ebp, 0x2740
jne 0x10037801
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x14]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x30]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
mov edi, 0x10093a10
mov ecx, 2
xor eax, eax
mov dword [esp + 0x40], edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x10037766
push 0x7f000001
call sub.WSOCK32.dll_htonl
mov dword [esp + 0x38], eax
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
je 0x10037801
lea ecx, [esp + 0x34]
push 0x10
push ecx
push esi
call sub.WSOCK32.dll_connect
push esi
mov edi, eax
call sub.WSOCK32.dll_closesocket
cmp edi, 0xffffffff
jne 0x10037801
push ebx
mov esi, 2
call sub.WSOCK32.dll_closesocket
push 6
push 1
push esi
call sub.WSOCK32.dll_socket
mov ebx, eax
cmp ebx, edi
jne 0x100376cb
push 0x260
push str..crypto_bio_b_sock.c
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 4
push 2
call sym.LIBEAY32.dll_ERR_put_error
mov edx, dword [esp + 0x5c]
push 0x100939d4
push edx
push str.port
push 3
call sym.LIBEAY32.dll_ERR_add_error_data
push 0x262
push str..crypto_bio_b_sock.c
push 0x76
push 0x69
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x38
jmp 0x100378a3
push 0x28b
push str..crypto_bio_b_sock.c
push ebp
push 6
push 2
call sym.LIBEAY32.dll_ERR_put_error
mov eax, dword [esp + 0x5c]
push 0x100939d4
push eax
push str.port
push 3
call sym.LIBEAY32.dll_ERR_add_error_data
push 0x28d
push str..crypto_bio_b_sock.c
push 0x75
push 0x69
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x38
jmp 0x100378a3
push 5
push ebx
call sub.WSOCK32.dll_listen
cmp eax, 0xffffffff
jne 0x1003789b
push 0x292
push str..crypto_bio_b_sock.c
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 6
push 2
call sym.LIBEAY32.dll_ERR_put_error
mov ecx, dword [esp + 0x5c]
push 0x100939d4
push ecx
push str.port
push 3
call sym.LIBEAY32.dll_ERR_add_error_data
push 0x294
push str..crypto_bio_b_sock.c
push 0x77
push 0x69
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x38
jmp 0x100378a3
mov dword [esp + 0x18], 1
mov esi, dword [esp + 0x10]
push esi
call sym.LIBEAY32.dll_CRYPTO_free
mov eax, dword [esp + 0x1c]
add esp, 4
test eax, eax
pop ebp
jne 0x100378c7
cmp ebx, 0xffffffff
je 0x100378c7
push ebx
call sub.WSOCK32.dll_closesocket
or ebx, 0xffffffff
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x34
ret