Function at 0x40ac60
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0xc7c
push esi
push edi
mov ecx, 0x208
xor eax, eax
lea edi, [esp + 0x461]
mov byte [esp + 0x460], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x1bd
mov dword [esp + 0x10], 0
stosb byte es:[edi], al
mov word [esp + 0x14], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x12], ax
mov eax, dword [esp + 0xc88]
push 6
push 1
push 2
mov dword [esp + 0x20], eax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40aced
push 0x41e764
call fcn.0040b9a0
add esp, 4
xor eax, eax
pop edi
pop esi
add esp, 0xc7c
ret
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
lea ecx, [esp + 8]
push 4
push ecx
push 0x1005
push 0xffff
push esi
mov dword [esp + 0x1c], 0xbb8
call edi
lea edx, [esp + 8]
push 4
push edx
push 0x1006
push 0xffff
push esi
call edi
lea eax, [esp + 0x10]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x40b055
push ebx
lea ecx, [esp + 0x464]
push ebp
push ecx
call fcn.0040ccd0
mov edx, dword [esp + 0x46e]
mov ebp, dword [sym.imp.WS2_32.dll_ntohs]
add esp, 4
push 0
push edx
call ebp
and eax, 0xffff
mov ebx, dword [sym.imp.WS2_32.dll_send]
add eax, 4
push eax
lea eax, [esp + 0x470]
push eax
push esi
call ebx
cmp eax, 0xffffffff
jne 0x40ad86
push str.ERROR::_Send_SmbNegotiate_Failed.
jmp 0x40b02e
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x28]
push eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x2c]
push 0x400
push ecx
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x40adb3
push 0x41e718
jmp 0x40b02e
cmp byte [esp + 0x28], 0xff
jne 0x40adcf
cmp byte [esp + 0x29], 0x53
jne 0x40adcf
cmp byte [esp + 0x2a], 0x4d
jne 0x40adcf
cmp byte [esp + 0x2b], 0x42
je 0x40adfb
cmp byte [esp + 0x2c], 0xff
jne 0x40b029
cmp byte [esp + 0x2d], 0x53
jne 0x40b029
cmp byte [esp + 0x2e], 0x4d
jne 0x40b029
cmp byte [esp + 0x2f], 0x42
jne 0x40b029
cmp word [0x4223ac], 0
jne 0x40ae1e
push 0x42247c
push 0x42247c
lea edx, [esp + 0x470]
push 0x42247c
push edx
jmp 0x40ae35
push 0x4223f0
push 0x42247c
lea eax, [esp + 0x470]
push 0x4223ac
push eax
call fcn.0040cd90
add esp, 0x10
test eax, eax
jne 0x40ae4b
push 0x41e6e8
jmp 0x40b02e
mov ecx, dword [esp + 0x46a]
push 0
push ecx
call ebp
and eax, 0xffff
lea edx, [esp + 0x46c]
add eax, 4
push eax
push edx
push esi
call ebx
cmp eax, 0xffffffff
jne 0x40ae7a
push str.ERROR::_Send_SmbSessionSetupAndX1_Failed
jmp 0x40b02e
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x28]
push eax
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
push 0x400
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x40aea7
push 0x41e694
jmp 0x40b02e
cmp byte [esp + 0x28], 0xff
jne 0x40aeca
cmp byte [esp + 0x29], 0x53
jne 0x40aeca
cmp byte [esp + 0x2a], 0x4d
jne 0x40aeca
cmp byte [esp + 0x2b], 0x42
jne 0x40aeca
mov edx, 0x20
jmp 0x40aefb
cmp byte [esp + 0x2c], 0xff
jne 0x40b022
cmp byte [esp + 0x2d], 0x53
jne 0x40b022
cmp byte [esp + 0x2e], 0x4d
jne 0x40b022
cmp byte [esp + 0x2f], 0x42
jne 0x40b022
mov edx, 0x24
mov eax, edx
and eax, 0xffff
mov di, word [esp + eax + 0x24]
lea ecx, [esp + eax + 0x28]
mov ax, word [esp + eax + 0x2f]
mov word [esp + 0x488], di
movzx cx, byte [ecx]
push eax
lea eax, [esp + 0x46c]
lea ecx, [edx + ecx*2 + 3]
and ecx, 0xffff
lea edx, [esp + ecx + 0x2c]
push edx
push eax
call fcn.0040d1a0
add esp, 0xc
test eax, eax
jne 0x40af4a
push 0x41e664
jmp 0x40b02e
mov ecx, dword [esp + 0x46a]
push ecx
call ebp
and eax, 0xffff
add eax, 4
cmp eax, 0x824
jbe 0x40af6d
push str.ERROR::_SMB
jmp 0x40b02e
push 0
lea edx, [esp + 0x46c]
push eax
push edx
push esi
call ebx
cmp eax, 0xffffffff
jne 0x40af8a
push str.ERROR::_Send_SmbSessionSetupAndX2_failed.
jmp 0x40b02e
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x28]
push eax
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
push 0x400
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x40afb4
push 0x41e5f8
jmp 0x40b02e
cmp byte [esp + 0x28], 0xff
jne 0x40afe9
cmp byte [esp + 0x29], 0x53
jne 0x40afe9
cmp byte [esp + 0x2a], 0x4d
jne 0x40afe9
cmp byte [esp + 0x2b], 0x42
jne 0x40afe9
mov eax, 0x20
and eax, 0xffff
mov cl, byte [esp + eax + 0x28]
test cl, cl
jne 0x40b013
push str.INFO::_NTLM
jmp 0x40b02e
cmp byte [esp + 0x2c], 0xff
jne 0x40b00c
cmp byte [esp + 0x2d], 0x53
jne 0x40b00c
cmp byte [esp + 0x2e], 0x4d
jne 0x40b00c
cmp byte [esp + 0x2f], 0x42
jne 0x40b00c
mov eax, 0x24
jmp 0x40afd5
push 0x41e5ac
jmp 0x40b02e
mov dword [esp + 0x14], 1
push 0x41e57c
jmp 0x40b02e
push 0x41e550
jmp 0x40b02e
push str.DEBUG::_l
call fcn.0040b9a0
add esp, 4
push 2
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esp + 0x14]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc7c
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
mov edi, eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0x14]
push edi
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea edx, [esp + 0x428]
push 0x41e504
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [esp + 0x430]
push eax
call fcn.0040b9a0
mov eax, dword [esp + 0x20]
add esp, 0x14
pop edi
pop esi
add esp, 0xc7c
ret