Function at 0x45b454
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe84
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x17c], ebx
mov dword [ebp - 0x178], ebx
mov dword [ebp - 0x174], ebx
mov dword [ebp - 0x170], ebx
mov dword [ebp - 0x16c], ebx
mov dword [ebp - 0x168], ebx
mov dword [ebp - 0x164], ebx
mov dword [ebp - 0x160], ebx
mov dword [ebp - 0x15c], ebx
mov dword [ebp - 0x158], ebx
test dl, dl
je 0x45b4aa
add esp, 0xfffffff0
call fcn.004038ac
mov dword [ebp - 8], ecx
mov byte [ebp - 1], dl
mov esi, eax
lea edi, [ebp - 0x50]
xor eax, eax
push ebp
push 0x45be04
push dword fs:[eax]
mov dword fs:[eax], esp
mov cl, 1
xor edx, edx
mov eax, esi
call fcn.00419fe8
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 8]
mov dword [esi + 0x48], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x4c], eax
lea eax, [esi + 0xc58]
call fcn.00404384
mov dl, 1
mov eax, dword [0x459d10]
call fcn.0040355c
mov dword [esi + 0x44], eax
mov dl, 1
mov eax, dword [0x459d80]
call fcn.0040355c
mov dword [esi + 0x40], eax
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x459f1c]
call fcn.0045a8d8
mov ebx, eax
mov dword [esi + 0xc80], ebx
mov ecx, ebx
mov dl, 1
mov eax, dword [0x45a024]
call fcn.0045b10c
mov dword [esi + 0xc90], eax
mov eax, edi
mov edx, 0x10
call fcn.00407138
mov word [edi], 2
push 0
call sub.wsock32.dll_htonl
mov dword [edi + 4], eax
push 0x6f
call sub.wsock32.dll_htons
mov word [edi + 2], ax
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov ebx, eax
mov dword [esi + 0xc84], ebx
cmp ebx, 0xffffffff
jne 0x45b584
lea eax, [esi + 0xc58]
mov edx, 0x45be38
call fcn.004043d8
jmp 0x45b5dd
push 0x10
push edi
push ebx
call sub.wsock32.dll_bind
inc eax
jne 0x45b5a8
mov eax, dword [esi + 0xc84]
push eax
call sub.wsock32.dll_closesocket
mov dword [esi + 0xc84], 0xffffffff
jmp 0x45b5dd
push 0
mov eax, dword [esi + 0xc84]
push eax
call sub.wsock32.dll_listen
inc eax
jne 0x45b5dd
push 2
mov eax, dword [esi + 0xc84]
push eax
call sub.wsock32.dll_shutdown
mov eax, dword [esi + 0xc84]
push eax
call sub.wsock32.dll_closesocket
mov dword [esi + 0xc84], 0xffffffff
cmp dword [esi + 0xc58], 0
jne 0x45b5ef
cmp dword [esi + 0xc84], 0xffffffff
jne 0x45b5f3
xor ebx, ebx
jmp 0x45b5f5
mov bl, 1
mov byte [ebp - 0x39], 1
mov byte [ebp - 0x3a], 1
mov byte [ebp - 0x3b], 1
mov byte [ebp - 0x3c], 1
mov byte [ebp - 0x3d], 1
test bl, bl
jne 0x45b9d3
mov eax, edi
mov edx, 0x10
call fcn.00407138
mov word [edi], 2
push 0x7f000001
call sub.wsock32.dll_htonl
mov dword [edi + 4], eax
push 0x6f
call sub.wsock32.dll_htons
mov word [edi + 2], ax
mov eax, 6
mov dword [esi + 0xc8c], eax
mov eax, dword [esi + 0xc8c]
push eax
push 1
push 2
call sub.wsock32.dll_socket
mov dword [esi + 0xcb8], eax
cmp dword [esi + 0xcb8], 0xffffffff
jne 0x45b679
lea eax, [esi + 0xc58]
mov edx, 0x45be58
call fcn.004043d8
jmp 0x45b9d3
mov eax, edi
mov edx, 0x10
call fcn.00407138
mov word [edi], 2
push 0x7f000001
call sub.wsock32.dll_htonl
mov dword [edi + 4], eax
push 0x6f
call sub.wsock32.dll_htons
mov word [edi + 2], ax
push 0x10
push edi
mov eax, dword [esi + 0xcb8]
push eax
call sub.wsock32.dll_connect
inc eax
jne 0x45b6fd
mov eax, dword [esi + 0xcb8]
push eax
call sub.wsock32.dll_closesocket
mov dword [esi + 0xcb8], 0xffffffff
mov ax, word [edi + 2]
push eax
call sub.wsock32.dll_ntohs
movzx eax, ax
lea edx, [ebp - 0x158]
call fcn.00408684
mov ecx, dword [ebp - 0x158]
lea eax, [esi + 0xc58]
mov edx, 0x45be78
call fcn.00404690
jmp 0x45b9d3
xor eax, eax
mov dword [esi + 0xcc0], eax
mov dword [esi + 0xcc4], 4
call fcn.00402d58
mov eax, 0x7fffffff
call fcn.00402f9c
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x90]
test al, al
je 0x45b7c1
xor edx, edx
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x90]
test al, al
je 0x45b7c1
mov edx, 2
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x90]
test al, al
je 0x45b7c1
mov edx, 0x186a0
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x90]
test al, al
je 0x45b7c1
mov edx, 2
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x90]
test al, al
je 0x45b7c1
mov edx, 4
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x90]
test al, al
je 0x45b7c1
push 0
push 0
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x94]
test al, al
je 0x45b7c1
push 0
push 0
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x94]
test al, al
je 0x45b7c1
mov eax, esi
mov edx, dword [eax]
call dword [edx + 8]
test al, al
jne 0x45b7f4
mov ax, word [edi + 2]
push eax
call sub.wsock32.dll_ntohs
movzx eax, ax
lea edx, [ebp - 0x15c]
call fcn.00408684
mov ecx, dword [ebp - 0x15c]
lea eax, [esi + 0xc58]
mov edx, 0x45bea4
call fcn.00404690
jmp 0x45b997
lea eax, [ebp - 0x154]
call fcn.00459be0
lea edx, [ebp - 0x154]
mov eax, dword [esi + 0xcb8]
call fcn.00459bd0
mov eax, 5
mov dword [ebp - 0x10], eax
imul eax, eax, 0x3e8
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push eax
push 0
push 0
lea eax, [ebp - 0x154]
push eax
push 0
call sub.wsock32.dll_select
dec eax
jl 0x45b997
lea edx, [ebp - 0x18]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x6c]
test al, al
je 0x45b997
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x14]
jne 0x45b997
lea edx, [ebp - 0x18]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x6c]
test al, al
je 0x45b997
cmp byte [ebp - 0x18], 1
jne 0x45b997
lea edx, [ebp - 0x18]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x6c]
test al, al
je 0x45b997
cmp byte [ebp - 0x18], 0
jne 0x45b997
lea edx, [ebp - 0x28]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x70]
test al, al
je 0x45b997
lea edx, [ebp - 0x18]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x6c]
test al, al
je 0x45b997
cmp byte [ebp - 0x18], 0
jne 0x45b997
jmp 0x45b94c
cmp dword [ebp - 0x2c], 0x186a0
jne 0x45b8e2
cmp dword [ebp - 0x30], 2
jne 0x45b8e2
cmp dword [ebp - 0x34], 0x11
jne 0x45b8e2
mov byte [ebp - 0x39], 0
jmp 0x45b94c
cmp dword [ebp - 0x2c], 0x186a5
jne 0x45b8fd
cmp dword [ebp - 0x30], 3
jne 0x45b8fd
cmp dword [ebp - 0x34], 6
jne 0x45b8fd
mov byte [ebp - 0x3a], 0
jmp 0x45b94c
cmp dword [ebp - 0x2c], 0x186a5
jne 0x45b918
cmp dword [ebp - 0x30], 3
jne 0x45b918
cmp dword [ebp - 0x34], 0x11
jne 0x45b918
mov byte [ebp - 0x3b], 0
jmp 0x45b94c
cmp dword [ebp - 0x2c], 0x186a3
jne 0x45b933
cmp dword [ebp - 0x30], 3
jne 0x45b933
cmp dword [ebp - 0x34], 6
jne 0x45b933
mov byte [ebp - 0x3c], 0
jmp 0x45b94c
cmp dword [ebp - 0x2c], 0x186a3
jne 0x45b94c
cmp dword [ebp - 0x30], 3
jne 0x45b94c
cmp dword [ebp - 0x34], 0x11
jne 0x45b94c
mov byte [ebp - 0x3d], 0
lea edx, [ebp - 0x19]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x68]
and al, byte [ebp - 0x19]
je 0x45b997
lea edx, [ebp - 0x2c]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x6c]
test al, al
je 0x45b997
lea edx, [ebp - 0x30]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x6c]
test al, al
je 0x45b997
lea edx, [ebp - 0x34]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x6c]
test al, al
je 0x45b997
lea edx, [ebp - 0x38]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x6c]
test al, al
jne 0x45b8c7
cmp byte [ebp - 0x3c], 0
je 0x45b9af
cmp byte [ebp - 0x3d], 0
je 0x45b9af
cmp byte [ebp - 0x3a], 0
je 0x45b9af
cmp byte [ebp - 0x3b], 0
jne 0x45b9d3
push 2
mov eax, dword [esi + 0xcb8]
push eax
call sub.wsock32.dll_shutdown
mov eax, dword [esi + 0xcb8]
push eax
call sub.wsock32.dll_closesocket
mov dword [esi + 0xcb8], 0xffffffff
cmp dword [esi + 0xc58], 0
jne 0x45ba50
cmp byte [ebp - 0x3c], 0
je 0x45b9e8
cmp byte [ebp - 0x3d], 0
jne 0x45b9fa
lea eax, [esi + 0xc58]
mov edx, 0x45bed0
call fcn.004043d8
jmp 0x45ba50
cmp byte [ebp - 0x3a], 0
je 0x45ba06
cmp byte [ebp - 0x3b], 0
jne 0x45ba18
lea eax, [esi + 0xc58]
mov edx, 0x45bf08
call fcn.004043d8
jmp 0x45ba50
test bl, bl
je 0x45ba22
cmp byte [ebp - 0x39], 0
jne 0x45ba50
mov ax, word [edi + 2]
push eax
call sub.wsock32.dll_ntohs
movzx eax, ax
lea edx, [ebp - 0x160]
call fcn.00408684
mov ecx, dword [ebp - 0x160]
lea eax, [esi + 0xc58]
mov edx, 0x45bf44
call fcn.00404690
cmp dword [esi + 0xc58], 0
sete al
test al, bl
je 0x45bac8
cmp byte [ebp - 0x39], 0
je 0x45bac8
push 0x11
push 2
push 2
call sub.wsock32.dll_socket
mov ebx, eax
mov dword [esi + 0xc88], ebx
cmp ebx, 0xffffffff
jne 0x45ba8e
lea eax, [esi + 0xc58]
mov edx, 0x45bf80
call fcn.004043d8
jmp 0x45bac8
push 0x10
push edi
push ebx
call sub.wsock32.dll_bind
inc eax
jne 0x45bac8
mov ax, word [edi + 2]
push eax
call sub.wsock32.dll_ntohs
movzx eax, ax
lea edx, [ebp - 0x164]
call fcn.00408684
mov ecx, dword [ebp - 0x164]
lea eax, [esi + 0xc58]
mov edx, 0x45bfa0
call fcn.00404690
mov eax, edi
mov edx, 0x10
call fcn.00407138
mov word [edi], 2
push 0
call sub.wsock32.dll_htonl
mov dword [edi + 4], eax
push 0x27b
call sub.wsock32.dll_htons
mov word [edi + 2], ax
cmp dword [esi + 0xc58], 0
sete al
and al, byte [ebp - 0x3a]
je 0x45bba9
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov ebx, eax
mov dword [esi + 0xc70], ebx
cmp ebx, 0xffffffff
jne 0x45bb2e
lea eax, [esi + 0xc58]
mov edx, 0x45be58
call fcn.004043d8
jmp 0x45bba9
push 0x10
push edi
push ebx
call sub.wsock32.dll_bind
inc eax
jne 0x45bb6a
mov ax, word [edi + 2]
push eax
call sub.wsock32.dll_ntohs
movzx eax, ax
lea edx, [ebp - 0x168]
call fcn.00408684
mov ecx, dword [ebp - 0x168]
lea eax, [esi + 0xc58]
mov edx, 0x45bfd0
call fcn.00404690
jmp 0x45bba9
push 0
mov eax, dword [esi + 0xc70]
push eax
call sub.wsock32.dll_listen
inc eax
jne 0x45bba9
mov ax, word [edi + 2]
push eax
call sub.wsock32.dll_ntohs
movzx eax, ax
lea edx, [ebp - 0x16c]
call fcn.00408684
mov ecx, dword [ebp - 0x16c]
lea eax, [esi + 0xc58]
mov edx, 0x45c000
call fcn.00404690
cmp dword [esi + 0xc58], 0
sete al
and al, byte [ebp - 0x3b]
je 0x45bc1c
push 0x11
push 2
push 2
call sub.wsock32.dll_socket
mov ebx, eax
mov dword [esi + 0xc74], ebx
cmp ebx, 0xffffffff
jne 0x45bbe2
lea eax, [esi + 0xc58]
mov edx, 0x45bf80
call fcn.004043d8
jmp 0x45bc1c
push 0x10
push edi
push ebx
call sub.wsock32.dll_bind
inc eax
jne 0x45bc1c
mov ax, word [edi + 2]
push eax
call sub.wsock32.dll_ntohs
movzx eax, ax
lea edx, [ebp - 0x170]
call fcn.00408684
mov ecx, dword [ebp - 0x170]
lea eax, [esi + 0xc58]
mov edx, 0x45bfa0
call fcn.00404690
mov eax, edi
mov edx, 0x10
call fcn.00407138
mov word [edi], 2
push 0
call sub.wsock32.dll_htonl
mov dword [edi + 4], eax
push 0x801
call sub.wsock32.dll_htons
mov word [edi + 2], ax
cmp dword [esi + 0xc58], 0
sete al
and al, byte [ebp - 0x3c]
je 0x45bcfd
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov ebx, eax
mov dword [esi + 0xc78], ebx
cmp ebx, 0xffffffff
jne 0x45bc82
lea eax, [esi + 0xc58]
mov edx, 0x45be58
call fcn.004043d8
jmp 0x45bcfd
push 0x10
push edi
push ebx
call sub.wsock32.dll_bind
inc eax
jne 0x45bcbe
mov ax, word [edi + 2]
push eax
call sub.wsock32.dll_ntohs
movzx eax, ax
lea edx, [ebp - 0x174]
call fcn.00408684
mov ecx, dword [ebp - 0x174]
lea eax, [esi + 0xc58]
mov edx, 0x45bfd0
call fcn.00404690
jmp 0x45bcfd
push 0
mov eax, dword [esi + 0xc78]
push eax
call sub.wsock32.dll_listen
inc eax
jne 0x45bcfd
mov ax, word [edi + 2]
push eax
call sub.wsock32.dll_ntohs
movzx eax, ax
lea edx, [ebp - 0x178]
call fcn.00408684
mov ecx, dword [ebp - 0x178]
lea eax, [esi + 0xc58]
mov edx, 0x45c000
call fcn.00404690
cmp dword [esi + 0xc58], 0
sete al
and al, byte [ebp - 0x3d]
je 0x45bd70
push 0x11
push 2
push 2
call sub.wsock32.dll_socket
mov ebx, eax
mov dword [esi + 0xc7c], ebx
cmp ebx, 0xffffffff
jne 0x45bd36
lea eax, [esi + 0xc58]
mov edx, 0x45bf80
call fcn.004043d8
jmp 0x45bd70
push 0x10
push edi
push ebx
call sub.wsock32.dll_bind
inc eax
jne 0x45bd70
mov ax, word [edi + 2]
push eax
call sub.wsock32.dll_ntohs
movzx eax, ax
lea edx, [ebp - 0x17c]
call fcn.00408684
mov ecx, dword [ebp - 0x17c]
lea eax, [esi + 0xc58]
mov edx, 0x45bfa0
call fcn.00404690
lea eax, [esi + 0xc94]
mov edx, 0x14
call fcn.00407138
lea eax, [esi + 0xc94]
mov ecx, 1
mov edx, 0x8000
call fcn.0045a2ec
lea eax, [esi + 0xcbc]
mov edx, 0x14
call fcn.00407138
lea eax, [esi + 0xcbc]
mov ecx, 1
mov edx, 0x8000
call fcn.0045a2ec
lea eax, [esi + 0xc5c]
mov edx, 0x14
call fcn.00407138
mov byte [esi + 0xc6c], 1
lea eax, [esi + 0xc5c]
mov ecx, 1
mov edx, 0x10000
call fcn.0045a2ec
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45be0b
lea eax, [ebp - 0x17c]
mov edx, 0xa
call fcn.004043a8
ret