Function at 0x405040
Capabilities:
Create raw socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x5a1c
call fcn.0051eee0
mov eax, dword [0x599808]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0
push 0
push 0
mov esi, ecx
push 0
inc dword [esi + 0x1de8]
push eax
push dword [esi + 0x1de8]
lea edi, [esi + 0x1878]
push 3
mov ecx, edi
mov dword [ebp - 0x5a18], eax
call fcn.0040ceb7
mov ebx, dword [ebp + 0xc]
push 0xa
push 0x20
lea eax, [ebp - 0x24]
push eax
push ebx
call fcn.0051fbe5
add esp, 0x10
lea eax, [ebp - 0x24]
push eax
push 1
push dword [esi + 0x1de8]
mov ecx, edi
call fcn.0040d0cb
push str.unknown
push 2
push dword [esi + 0x1de8]
mov ecx, edi
call fcn.0040d0cb
push str.Connecting_to_Host...
push 3
push dword [esi + 0x1de8]
mov ecx, edi
call fcn.0040d0cb
push 0xffffff
push 0
push dword [esi + 0x1de8]
mov ecx, edi
call fcn.00407250
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x1df4], eax
cmp eax, 0xffffffff
jne 0x405133
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error:_Network_initialization_failed
push 3
push dword [esi + 0x1de8]
mov ecx, edi
call fcn.0040d0cb
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051eae1
mov esp, ebp
pop ebp
ret 8
push dword [ebp - 0x5a18]
lea eax, [esi + 0x1cc4]
push 0x100
push eax
mov dword [esi + 0x1de4], ebx
call fcn.0051f166
add esp, 0xc
push 0
push 0
push 0
push 2
push esi
push 0x403280
call fcn.0040ef7a
push 0x3e8
push dword [eax + 0x2c]
mov dword [ebp - 0x5a18], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4051c7
push dword [esi + 0x1df4]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x5a18]
push 0xffffffffffffffff
push dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push str.Connection_timed_out._Either_host_is_down_or_port_is_not_open
push 3
push dword [esi + 0x1de8]
mov ecx, edi
call fcn.0040d0cb
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051eae1
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x5a1c]
push eax
mov eax, dword [ebp - 0x5a18]
push dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
mov eax, dword [ebp - 0x5a1c]
cmp eax, 1
jne 0x405292
cmp ebx, 0xcea
ja 0x405219
je 0x405212
mov eax, ebx
sub eax, 0x599
je 0x40520b
sub eax, 0x58
jne 0x405229
push str.Oracle
jmp 0x40523c
push str.MSSQL
jmp 0x40523c
push str.MySQL
jmp 0x40523c
cmp ebx, 0x1538
je 0x405237
cmp ebx, 0xc350
je 0x405230
push str.unknown
jmp 0x40523c
push 0x54ac1c
jmp 0x40523c
push str.PostgreSQL
push 2
push dword [esi + 0x1de8]
mov ecx, edi
call fcn.0040d0cb
inc dword [esi + 0x1de0]
push 0xdcffdc
push 0
push dword [esi + 0x1de8]
mov ecx, edi
call fcn.00407250
cmp ebx, 0xcea
je 0x4052a5
push dword [esi + 0x1df4]
call dword [sym.imp.WS2_32.dll_closesocket]
push str.Port_is_Open
push 3
push dword [esi + 0x1de8]
mov ecx, edi
call fcn.0040d0cb
mov eax, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051eae1
mov esp, ebp
pop ebp
ret 8
push str.Port_is_Open__Now_performing_verification...
push 3
push dword [esi + 0x1de8]
mov ecx, edi
call fcn.0040d0cb
push 0
push 0x2710
lea eax, [ebp - 0x2b34]
push eax
push dword [esi + 0x1df4]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x405300
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push str.Port_is_Open__no_additional_info_found_
push 3
push dword [esi + 0x1de8]
mov ecx, edi
call fcn.0040d0cb
push dword [esi + 0x1df4]
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x40528d
cmp eax, 0x2710
jae 0x4053e8
push 0x200
lea ecx, [ebp - 0x224]
push ecx
lea ecx, [ebp - 0x424]
push ecx
push eax
mov byte [ebp + eax - 0x2b34], 0
lea eax, [ebp - 0x2b34]
push eax
mov ecx, esi
call fcn.004030d0
test eax, eax
je 0x4053af
lea eax, [ebp - 0x424]
push eax
push str.Port_is_Open.__s
lea eax, [ebp - 0x5a14]
push 0x2ee0
push eax
call fcn.0051fbac
add esp, 0x10
lea eax, [ebp - 0x5a14]
push eax
push 3
push dword [esi + 0x1de8]
mov ecx, edi
call fcn.0040d0cb
cmp byte [ebp - 0x224], 0
je 0x4052f2
lea eax, [ebp - 0x224]
push eax
push str.MySQL
push str._s_v_s
lea eax, [ebp - 0x5a14]
push 0x2ee0
push eax
call fcn.0051fbac
add esp, 0x14
lea eax, [ebp - 0x5a14]
push eax
push 2
jmp 0x4052e5
push str.Port_is_Open._But_MySQL_protocol_verification_failed
push 3
push dword [esi + 0x1de8]
mov ecx, edi
call fcn.0040d0cb
push 0x5bb9ff
push 0
push dword [esi + 0x1de8]
mov ecx, edi
call fcn.00407250
push dword [esi + 0x1df4]
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x40528d
call fcn.0051f08c
int3