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

Disassembly:
mov eax, 8
call fcn.005458d0
mov eax, dword [esi + 0x28]
push ebp
push edi
xor edi, edi
or ebp, 0xffffffff
mov dword [esp + 0xc], edi
test eax, eax
je 0x487622
mov dword [esp + 0xc], eax
mov edi, eax
mov eax, dword [esi]
dec eax
cmp eax, 7
ja case.default.0x487630
mov edi, edi
jmp dword [eax*4 + 0x487a64]
mov edi, dword [esi + 4]
test edi, edi
je 0x4878c8
cmp byte [edi], 0
je 0x487657
mov al, byte [edi]
cmp al, 0x3a
je 0x487657
cmp al, 0x2f
je 0x487657
inc edi
cmp byte [edi], 0
jne 0x487647
movsx eax, byte [edi]
mov dword [esp + 8], eax
cmp eax, 0x3a
je 0x487668
cmp eax, 0x2f
jne 0x4876ac
mov byte [edi], 0
inc edi
cmp dword [esp + 8], 0x3a
jne 0x4876ac
cmp byte [edi], 0
mov eax, edi
je 0x487690
lea ebx, [ebx]
cmp byte [eax], 0x2f
je 0x48768d
inc eax
cmp byte [eax], 0
jne 0x487680
jmp 0x487690
mov byte [eax], 0
mov eax, dword [esi + 8]
test eax, eax
je 0x4876a0
push eax
call fcn.00401230
add esp, 4
push edi
call fcn.0040e300
add esp, 4
mov dword [esi + 8], eax
cmp dword [esi + 8], 0
je 0x4878e9
mov edi, dword [esp + 0xc]
mov dword [esi], 2
jmp 0x48789f
mov ecx, dword [esi + 4]
lea eax, [esi + 0x10]
push eax
push ecx
call fcn.004aeff0
add esp, 8
test eax, eax
jle case.default.0x487630
mov dword [esi], 3
jmp 0x48789f
mov eax, dword [esi + 8]
test eax, eax
je case.default.0x487630
lea edx, [esi + 0x14]
push edx
push eax
call fcn.004aeb60
add esp, 8
test eax, eax
jle case.default.0x487630
mov dword [esi], 4
jmp 0x48789f
xor eax, eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
movzx ecx, word [esi + 0x14]
mov eax, 2
push ecx
mov word [esi + 0x18], ax
call dword [sym.imp.WS2_32.dll_htons]
movzx edx, byte [esi + 0x11]
movzx ecx, byte [esi + 0x12]
mov word [esi + 0x1a], ax
movzx eax, byte [esi + 0x10]
shl eax, 8
or eax, edx
movzx edx, byte [esi + 0x13]
shl eax, 8
or eax, ecx
shl eax, 8
or eax, edx
push eax
call dword [sym.imp.WS2_32.dll_htonl]
push 6
push 1
push 2
mov dword [esi + 0x1c], eax
mov dword [esi], 4
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x48791a
mov dword [ebx + 0x1c], ebp
mov dword [esi], 8
jmp 0x48789f
cmp dword [esi + 0xc], 0
je 0x4877a9
mov eax, dword [ebx + 0x1c]
push 1
push eax
call fcn.004aefa0
add esp, 8
test eax, eax
je 0x48796a
push 4
lea ecx, [esp + 0xc]
push ecx
push 8
mov dword [esi], 5
mov edx, dword [ebx + 0x1c]
push 0xffff
push edx
mov dword [esp + 0x1c], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [esp + 8], eax
test eax, eax
jns 0x48789f
push 0xe2
push str..crypto_bio_bss_conn.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 4
push 2
call fcn.004039b0
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push eax
push 0x5c1694
push ecx
push 0x59f410
push 4
call fcn.00403c70
push 0xe5
push str..crypto_bio_bss_conn.c
push 0x6d
push 0x73
push 0x20
call fcn.004039b0
add esp, 0x3c
jmp case.default.0x487630
push 0xf
push ebx
call fcn.00405290
mov ecx, dword [ebx + 0x1c]
add esp, 8
push 0x10
lea eax, [esi + 0x18]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov ebp, eax
mov dword [ebx + 0x18], 0
test ebp, ebp
jns 0x487899
push ebp
call fcn.0046f600
add esp, 4
test eax, eax
je 0x4879a0
push 0xc
push ebx
call fcn.004052b0
mov dword [esi], 7
add esp, 8
mov dword [ebx + 0x18], 2
jmp case.default.0x487630
mov edx, dword [ebx + 0x1c]
push edx
call fcn.004aedf0
add esp, 4
mov dword [esp + 8], eax
test eax, eax
jne 0x4879ed
mov dword [esi], 6
test edi, edi
je 0x4878b7
mov eax, dword [esi]
push ebp
push eax
push ebx
call edi
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x487a5b
mov eax, dword [esi]
dec eax
cmp eax, 7
jbe switch.0x00487630
jmp case.default.0x487630
push 0x8b
push str..crypto_bio_bss_conn.c
push 0x70
push 0x73
push 0x20
call fcn.004039b0
mov edi, dword [esp + 0x20]
add esp, 0x14
jmp case.default.0x487630
push 0xa4
push str..crypto_bio_bss_conn.c
push 0x72
push 0x73
push 0x20
call fcn.004039b0
mov ecx, dword [esi + 4]
push ecx
push 0x59f410
push 2
call fcn.00403c70
mov edi, dword [esp + 0x2c]
add esp, 0x20
jmp case.default.0x487630
push 0xc8
push str..crypto_bio_bss_conn.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 4
push 2
call fcn.004039b0
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push 0x5c1694
push eax
push 0x59f410
push 4
call fcn.00403c70
push 0xcb
push str..crypto_bio_bss_conn.c
push 0x76
push 0x73
push 0x20
call fcn.004039b0
add esp, 0x3c
jmp case.default.0x487630
push 0xd5
push str..crypto_bio_bss_conn.c
push 0x68
push 0x73
push 0x20
call fcn.004039b0
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
push ecx
push 0x5c1694
push edx
push 0x59f410
push 4
call fcn.00403c70
add esp, 0x28
jmp case.default.0x487630
push 0xf6
push str..crypto_bio_bss_conn.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
push 2
call fcn.004039b0
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push 0x5c1694
push eax
push 0x59f410
push 4
call fcn.00403c70
push 0xf9
push str..crypto_bio_bss_conn.c
push 0x67
push 0x73
push 0x20
call fcn.004039b0
add esp, 0x3c
jmp case.default.0x487630
push 0xf
push ebx
call fcn.00405290
mov ecx, dword [esp + 0x10]
push 0x104
push str..crypto_bio_bss_conn.c
push ecx
push 2
push 2
call fcn.004039b0
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push 0x5c1694
push eax
push 0x59f410
push 4
call fcn.00403c70
push 0x107
push str..crypto_bio_bss_conn.c
push 0x6e
push 0x73
push 0x20
call fcn.004039b0
add esp, 0x44
xor ebp, ebp
jmp case.default.0x487630
mov ebp, 1
test edi, edi
je 0x487a5b
mov ecx, dword [esi]
push ebp
push ecx
push ebx
call edi
add esp, 0xc
pop edi
pop ebp
add esp, 8
ret
pop edi
mov eax, ebp
pop ebp
add esp, 8
ret