Function at 0x45c670
Capabilities:
Connect socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x970
push ebx
push ebp
push esi
push edi
xor edi, edi
mov esi, 2
push edi
push 1
mov ebp, ecx
push esi
call sub.WSOCK32.dll_socket
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x45c6a0
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x970
ret
mov ecx, dword [ebp + 0xf2c]
xor eax, eax
mov dword [esp + 0x1c], eax
lea edx, [esp + 0x2c]
mov dword [esp + 0x20], eax
push edx
mov dword [esp + 0x28], eax
push 0x8004667e
push ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x2c], ecx
mov word [esp + 0x2a], di
mov word [esp + 0x28], si
mov dword [esp + 0x38], 1
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
je 0x45c6f5
push ebx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x970
ret
lea eax, [esp + 0x1c]
push 0x10
push eax
push ebx
call sub.WSOCK32.dll_bind
test eax, eax
je 0x45c719
push ebx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x970
ret
mov ax, word [ebp + 0xf20]
mov edx, dword [ebp + 0xf1c]
xor ecx, ecx
push eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
call sub.WSOCK32.dll_htons
lea ecx, [esp + 0x1c]
push 0x10
push ecx
push ebx
mov word [esp + 0x2a], ax
mov word [esp + 0x28], si
call sub.WSOCK32.dll_connect
cmp eax, edi
je 0x45c7c6
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x45c77c
push ebx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x970
ret
mov edx, dword [ebp + 0xf24]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x7c]
push edi
push ecx
push edi
push edi
mov dword [esp + 0x90], ebx
mov dword [esp + 0x8c], 1
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], edi
call sub.WSOCK32.dll_select
cmp eax, 1
jge 0x45c7c6
push ebx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x970
ret
mov esi, dword [ebp + 0xf3c]
mov ecx, 0x10
lea edi, [esp + 0x38]
rep movsd dword es:[edi], dword [esi]
mov esi, 1
xor edi, edi
push edi
lea edx, [esp + 0x3c]
push 0x40
push edx
push ebx
call sub.WSOCK32.dll_send
cmp eax, 0x40
jae 0x45c852
cmp eax, edi
je 0x45ca1d
jge 0x45c80b
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x45ca1d
mov eax, dword [ebp + 0xf24]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x7c]
push edi
push edx
shl eax, 1
push edi
push edi
mov dword [esp + 0x90], ebx
mov dword [esp + 0x8c], esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edi
call sub.WSOCK32.dll_select
cmp eax, esi
jge 0x45c7de
push ebx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x970
ret
xor esi, esi
mov eax, dword [ebp + 0xf24]
lea ecx, [esp + 0x30]
push ecx
push edi
lea edx, [esp + 0x80]
push edi
lea eax, [eax + eax*2]
push edx
push edi
mov dword [esp + 0x90], ebx
mov dword [esp + 0x8c], 1
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], edi
call sub.WSOCK32.dll_select
cmp eax, 1
jl 0x45ca1d
lea eax, [esp + 0x14]
mov dword [esp + 0x14], edi
push eax
push 0x4004667f
push ebx
call sub.WSOCK32.dll_ioctlsocket
mov eax, dword [esp + 0x14]
push edi
lea ecx, [eax + esi]
cmp ecx, 0x804
ja 0x45c8c4
lea edx, [esp + esi + 0x180]
push eax
push edx
jmp 0x45c8d4
mov eax, 0x804
lea ecx, [esp + esi + 0x180]
sub eax, esi
push eax
push ecx
push ebx
call sub.WSOCK32.dll_recv
cmp eax, 1
jl 0x45ca1d
add esi, eax
mov eax, dword [esp + 0x17c]
cmp esi, 4
jl 0x45c8f8
cmp eax, 0x4b4341
jne 0x45c904
cmp esi, 0x804
jb 0x45c854
xor edx, edx
cmp esi, 4
setl dl
dec edx
and eax, edx
cmp eax, 0x335245
ja 0x45c9da
je 0x45c9a3
cmp eax, 0x315245
je 0x45c96c
cmp eax, 0x325245
jne 0x45ca10
mov al, byte [ebp + 0xf60]
test al, al
jne 0x45c95b
mov eax, dword [0x4fa100]
push 0x2010
mov ecx, dword [eax + 0x978]
mov edx, dword [eax + 0x98c]
push ecx
push edx
push edi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [ebp + 0xf60], 1
mov edi, 3
jmp 0x45ca12
mov al, byte [ebp + 0xf60]
test al, al
jne 0x45c995
mov eax, dword [0x4fa100]
push 0x2010
mov ecx, dword [eax + 0x978]
mov edx, dword [eax + 0x988]
push ecx
push edx
push edi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [ebp + 0xf60], 1
mov edi, 2
jmp 0x45ca12
mov al, byte [ebp + 0xf60]
test al, al
jne 0x45c9cc
mov eax, dword [0x4fa100]
push 0x2010
mov ecx, dword [eax + 0x978]
mov edx, dword [eax + 0x990]
push ecx
push edx
push edi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [ebp + 0xf60], 1
mov edi, 4
jmp 0x45ca12
cmp eax, 0x4b4341
je 0x45c9ef
cmp eax, 0x52454a
jne 0x45ca10
mov edi, 1
jmp 0x45ca12
cmp esi, 0x804
mov edi, 5
jl 0x45ca10
lea eax, [esp + 0x180]
push eax
call fcn.00479b50
add esp, 4
test al, al
jne 0x45ca12
xor edi, edi
cmp edi, 5
mov dword [ebp + 0xf34], edi
je 0x45ca30
push ebx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x970
ret
lea ecx, [esp + 0x180]
push ecx
mov ecx, ebp
call fcn.0045cd40
cmp byte [ebp + 6], 1
ja 0x45ca58
cmp byte [ebp + 7], 0x18
jae 0x45ca58
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x970
ret
mov ecx, ebp
call fcn.0045aea0
test eax, eax
setne dl
mov ecx, ebp
mov byte [ebp + 0xf6a], dl
call fcn.0045b000
test eax, eax
setne al
mov ecx, ebp
mov byte [ebp + 0xf6b], al
call fcn.0045b060
test eax, eax
mov eax, dword [esp + 0x4c]
setne cl
test eax, eax
mov byte [ebp + 0xf6c], cl
je 0x45caa6
mov ecx, ebp
call fcn.0045aea0
test eax, eax
mov byte [esp + 0x13], 1
jne 0x45caab
mov byte [esp + 0x13], 0
mov eax, dword [esp + 0x4c]
test eax, eax
jne 0x45cabb
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x45cad4
mov ecx, ebp
call fcn.0045aea0
mov ecx, ebp
mov esi, eax
call fcn.0045ae60
add esi, eax
mov word [ebp + 0x64e], si
mov ecx, ebp
call fcn.0045af40
mov ecx, ebp
mov word [ebp + 0x85b], ax
call fcn.0045afa0
test eax, eax
je 0x45cafa
mov ecx, ebp
call fcn.0045afa0
mov byte [ebp + 0x820], al
mov al, byte [ebp + 0x826]
test al, al
je 0x45cb23
mov eax, dword [esp + 0x48]
test eax, eax
jne 0x45cb18
mov eax, dword [esp + 0x40]
test eax, eax
jne 0x45cb18
xor eax, eax
jmp 0x45cb1d
mov eax, 1
mov byte [ebp + 0x826], al
mov al, byte [ebp + 0x813]
test al, al
je 0x45cb4c
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x45cb41
mov eax, dword [esp + 0x4c]
test eax, eax
jne 0x45cb41
xor eax, eax
jmp 0x45cb46
mov eax, 1
mov byte [ebp + 0x813], al
mov al, byte [ebp + 0x818]
test al, al
je 0x45cb65
mov al, byte [esp + 0x13]
test al, al
setne dl
mov byte [ebp + 0x818], dl
mov dl, byte [ebp + 0x813]
mov cl, byte [ebp + 0x81b]
test dl, dl
setne al
test cl, cl
je 0x45cb89
mov cl, byte [esp + 0x13]
test cl, cl
setne cl
mov byte [ebp + 0x81b], cl
mov cl, byte [ebp + 0x83e]
test cl, cl
je 0x45cb9e
test al, al
setne dl
mov byte [ebp + 0x83e], dl
mov cl, byte [ebp + 0x8c5]
test cl, cl
je 0x45cbb3
test al, al
setne al
mov byte [ebp + 0x8c5], al
mov ecx, ebp
call fcn.0045afa0
test eax, eax
mov eax, dword [esp + 0x3c]
setne cl
test eax, eax
mov byte [ebp + 0xf69], cl
jne 0x45cc02
mov eax, dword [esp + 0x4c]
test eax, eax
jne 0x45cc02
mov eax, dword [esp + 0x48]
test eax, eax
jne 0x45cc02
mov ecx, ebp
call fcn.0045af40
test eax, eax
je 0x45cbf9
mov eax, dword [esp + 0x44]
test eax, eax
setne dl
mov byte [ebp + 0x815], dl
jmp 0x45cc1c
mov byte [ebp + 0x815], 0
jmp 0x45cc1c
mov ecx, ebp
call fcn.0045afa0
test eax, eax
je 0x45cc1c
mov eax, dword [esp + 0x48]
test eax, eax
setne al
mov byte [ebp + 0x815], al
mov ecx, ebp
call fcn.0045aee0
test eax, eax
setne al
mov byte [ebp + 0xf68], al
mov byte [ebp + 0x83a], al
mov eax, dword [esp + 0x40]
test eax, eax
jne 0x45cc70
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x45cc70
mov eax, dword [esp + 0x48]
test eax, eax
jne 0x45cc70
mov eax, dword [esp + 0x44]
test eax, eax
jne 0x45cc70
mov byte [ebp + 0x826], 1
mov byte [ebp + 0x813], 1
mov byte [ebp + 0x815], 1
mov byte [ebp + 0x820], 1
lea ecx, [ebp + 0x5e8]
xor edi, edi
push str._HASP_
push ecx
mov word [ebp + 0x82f], di
mov word [ebp + 0x831], di
mov word [ebp + 0x833], di
mov word [ebp + 0x835], di
mov word [ebp + 0x837], di
mov word [ebp + 0x841], di
mov word [ebp + 0x83f], di
mov word [ebp + 0x8c7], di
mov byte [ebp + 0x64a], 0
call fcn.00462910
mov esi, eax
add esp, 8
cmp esi, edi
je 0x45cd0a
mov byte [esi], 0
dec esi
mov edx, esi
sub edx, ebp
sub edx, 0x40d
cmp edx, 0x1db
jle 0x45cd0a
mov edi, dword [sym.imp.MSVCRT.dll_isspace]
movsx eax, byte [esi]
push eax
call edi
add esp, 4
test eax, eax
je 0x45cd0a
mov byte [esi], 0
dec esi
mov ecx, esi
sub ecx, ebp
sub ecx, 0x40d
cmp ecx, 0x1db
jg 0x45cce7
pop edi
mov dword [ebp + 0xf28], ebx
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x970
ret