Function at 0x10049db0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Set socket configuration

Disassembly:
mov eax, 0x30
call fcn.100a1060
push ebx
mov dword [esp + 0x10], 0
or ebx, 0xffffffff
call sym.LIBEAY32.dll_BIO_sock_init
cmp eax, 1
je 0x10049dd8
or eax, 0xffffffff
pop ebx
add esp, 0x30
ret
mov eax, dword [esp + 0x38]
push esi
push eax
call sym.LIBEAY32.dll_BUF_strdup
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 8], esi
jne 0x10049df9
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x30
ret
mov cl, byte [esi]
push ebp
xor edx, edx
test cl, cl
mov ebp, esi
mov dword [esp + 0x14], ebp
mov eax, esi
je 0x10049e35
lea ebx, [ebx]
mov cl, byte [eax]
cmp cl, 0x3a
jne 0x10049e1f
lea edx, [eax + 1]
mov byte [eax], 0
jmp 0x10049e24
cmp cl, 0x2f
je 0x10049e2e
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10049e10
jmp 0x10049e31
mov byte [eax], 0
test edx, edx
jne 0x10049e43
mov dword [esp + 0x14], 0x100b2cb0
mov ebp, dword [esp + 0x14]
mov edx, esi
lea ecx, [esp + 0x10]
push ecx
push edx
call sym.LIBEAY32.dll_BIO_get_port
add esp, 8
test eax, eax
je 0x1004a0d2
mov eax, dword [esp + 0x10]
xor edx, edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
push edi
mov dword [esp + 0x28], edx
push eax
mov dword [esp + 0x30], edx
mov word [esp + 0x24], 2
call sub.WSOCK32.dll_htons
mov edi, 0x100b2cb0
mov esi, ebp
mov ecx, 2
xor edx, edx
mov word [esp + 0x22], ax
repe cmpsb byte [esi], byte es:[edi]
jne 0x10049e9a
mov dword [esp + 0x24], edx
jmp 0x10049edb
lea eax, [esp + 0x14]
push eax
push ebp
call sym.LIBEAY32.dll_BIO_get_host_ip
add esp, 8
test eax, eax
je 0x1004a0cd
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov ch, al
movzx edx, ah
movzx eax, byte [esp + 0x16]
or ecx, edx
movzx edx, byte [esp + 0x17]
shl ecx, 8
or ecx, eax
shl ecx, 8
or ecx, edx
push ecx
call sub.WSOCK32.dll_htonl
mov dword [esp + 0x24], eax
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10049fdf
mov esi, dword [esp + 0x48]
cmp esi, 2
jne 0x10049f1c
push 4
lea eax, [esp + 0x20]
push eax
push 4
push 0xffff
push ebx
mov dword [esp + 0x30], 1
call sub.WSOCK32.dll_setsockopt
mov dword [esp + 0x1c], eax
xor esi, esi
push 0x10
lea ecx, [esp + 0x24]
push ecx
push ebx
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x1004a06f
call sub.WSOCK32.dll_WSAGetLastError
cmp esi, 1
mov ebp, eax
jne 0x1004a02b
cmp ebp, 0x2740
jne 0x1004a02b
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
mov edi, 0x100b2cb0
mov ecx, 2
xor eax, eax
mov dword [esp + 0x3c], edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x10049f90
push 0x7f000001
call sub.WSOCK32.dll_htonl
mov dword [esp + 0x34], eax
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
je 0x1004a02b
push 0x10
lea ecx, [esp + 0x34]
push ecx
push esi
call sub.WSOCK32.dll_connect
push esi
mov edi, eax
call sub.WSOCK32.dll_closesocket
cmp edi, 0xffffffff
jne 0x1004a02b
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 0x10049ef5
push 0x27a
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 + 0x58]
push 0x100b2c4c
push edx
push str.port
push 3
call sym.LIBEAY32.dll_ERR_add_error_data
push 0x27c
push str..crypto_bio_b_sock.c
push 0x76
push 0x69
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x38
jmp 0x1004a0cd
push 0x2a5
push str..crypto_bio_b_sock.c
push ebp
push 6
push 2
call sym.LIBEAY32.dll_ERR_put_error
mov eax, dword [esp + 0x58]
push 0x100b2c4c
push eax
push str.port
push 3
call sym.LIBEAY32.dll_ERR_add_error_data
push 0x2a7
push str..crypto_bio_b_sock.c
push 0x75
push 0x69
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x38
jmp 0x1004a0cd
push 5
push ebx
call sub.WSOCK32.dll_listen
cmp eax, 0xffffffff
jne 0x1004a0c5
push 0x2ac
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 + 0x58]
push 0x100b2c4c
push ecx
push str.port
push 3
call sym.LIBEAY32.dll_ERR_add_error_data
push 0x2ae
push str..crypto_bio_b_sock.c
push 0x77
push 0x69
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x38
jmp 0x1004a0cd
mov dword [esp + 0x1c], 1
mov esi, dword [esp + 0x10]
pop edi
push esi
call sym.LIBEAY32.dll_CRYPTO_free
mov eax, dword [esp + 0x1c]
add esp, 4
test eax, eax
pop ebp
jne 0x1004a0f2
cmp ebx, 0xffffffff
je 0x1004a0f2
push ebx
call sub.WSOCK32.dll_closesocket
or ebx, 0xffffffff
pop esi
mov eax, ebx
pop ebx
add esp, 0x30
ret