Function at 0x40c440
Capabilities:
Act as tcp client
Check for time delay via gettickcount
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48fe67
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x118
push esi
mov esi, ecx
mov dword [ebp - 0x18], esi
mov eax, dword [esi + 0x60]
test eax, eax
je 0x40c489
cmp eax, 0xffffffff
je 0x40c489
push 2
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [esi + 0x60]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x60], 0xffffffff
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x60], eax
cmp eax, 0xffffffff
je 0x40cbd2
test eax, eax
je 0x40cbd2
cmp dword [esi + 0x64], 0xffffffff
je 0x40cbd2
push edi
push 0xceb
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x72], ax
mov eax, 2
mov word [ebp - 0x74], ax
mov eax, dword [esi + 0x64]
mov dword [ebp - 0x70], eax
lea eax, [ebp - 0x74]
push 0x10
push eax
push dword [esi + 0x60]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x40cb0b
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0xf
mov byte [ebp - 0x30], 0
push 0
push 0x4ad0cb
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], 0
call fcn.0040ea50
nop dword [eax]
mov esi, 1
lea edi, [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x18]
push 0
push esi
push edi
push dword [eax + 0x60]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x40cab7
sub esi, eax
add edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x14]
cmp eax, 0x7530
ja 0x40cab7
test esi, esi
jg 0x40c531
mov ecx, dword [ebp - 0x64]
cmp cl, 0xa
je 0x40c5a7
mov edx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x1c]
cmp edx, esi
jae 0x40c591
lea eax, [edx + 1]
cmp esi, 0x10
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
mov byte [eax + edx], cl
mov byte [eax + edx + 1], 0
jmp 0x40c520
push ecx
mov byte [ebp - 0x10], 0
push dword [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x30]
call fcn.0040f910
jmp 0x40c520
mov ecx, 0x17
mov dword [ebp - 0x48], 0
cmp dword [ebp - 0x20], ecx
lea eax, [ebp - 0x30]
mov dword [ebp - 0x38], 0
cmovb ecx, dword [ebp - 0x20]
cmp dword [ebp - 0x1c], 0x10
push ecx
cmovae eax, dword [ebp - 0x30]
lea ecx, [ebp - 0x48]
push eax
mov dword [ebp - 0x34], 0xf
call fcn.0040ea50
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x30]
call fcn.0040e3c0
mov edx, dword [ebp - 0x34]
cmp edx, 0x10
jb 0x40c61d
mov ecx, dword [ebp - 0x48]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40c613
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cbff
push edx
push ecx
call fcn.0046a77c
add esp, 8
cmp dword [ebp - 0x1c], 0x10
lea eax, [ebp - 0x30]
push 0x17
cmovae eax, dword [ebp - 0x30]
push str.Acquire_Database_Engine
push dword [ebp - 0x20]
push eax
call fcn.0040f790
add esp, 0x10
test eax, eax
jne 0x40cab7
mov esi, dword [ebp - 0x18]
mov ecx, esi
call fcn.0040b8a0
test al, al
je 0x40cab7
cmp byte [esi + 0x68], 0
lea edi, [esi + 0x18]
je 0x40c7af
push ecx
lea ecx, [ebp - 0x124]
call fcn.0040de00
mov byte [ebp - 4], 1
mov eax, edi
cmp dword [edi + 0x14], 0x10
jb 0x40c67c
mov eax, dword [edi]
push dword [edi + 0x10]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.004101f0
add esp, 0xc
mov edx, 0x4ad1f0
mov ecx, eax
call fcn.0040f180
cmp dword [esi + 0x44], 0x10
lea ecx, [esi + 0x30]
jb 0x40c6a7
mov ecx, dword [esi + 0x30]
push dword [esi + 0x40]
push ecx
push eax
call fcn.004101f0
add esp, 0xc
mov edx, 0x4ad1f0
mov ecx, eax
call fcn.0040f180
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x124]
call fcn.0040dd30
mov edi, eax
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x124]
call fcn.0040dd30
cmp dword [eax + 0x14], 0x10
jb 0x40c6ec
mov eax, dword [eax]
push dword [edi + 0x10]
mov ecx, esi
push eax
call fcn.0040b840
mov edx, dword [ebp - 0x34]
test al, al
sete byte [ebp - 0x11]
cmp edx, 0x10
jb 0x40c731
mov ecx, dword [ebp - 0x48]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40c727
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cbe6
push edx
push ecx
call fcn.0046a77c
add esp, 8
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0xf
mov byte [ebp - 0x48], 0
cmp edx, 0x10
jb 0x40c777
mov ecx, dword [ebp - 0x60]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40c76d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cbe6
push edx
push ecx
call fcn.0046a77c
add esp, 8
cmp byte [ebp - 0x11], 0
jne 0x40c79a
mov ecx, esi
call fcn.0040b8a0
test al, al
je 0x40c79a
lea ecx, [ebp - 0x124]
xor esi, esi
call fcn.0040c1f0
jmp 0x40cabc
lea ecx, [ebp - 0x124]
mov esi, 3
call fcn.0040c1f0
jmp 0x40cabc
mov eax, dword [edi + 0x10]
mov byte [ebp - 0x14], 5
cmp eax, 0x7fffffff
je 0x40cbeb
cmp dword [edi + 0x14], 0x10
jb 0x40c7c9
mov edi, dword [edi]
push eax
push edi
push 1
lea eax, [ebp - 0x14]
push eax
push ecx
push dword [ebp - 0x10]
lea ecx, [ebp - 0x48]
call fcn.0040ff90
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
cmp ecx, edx
jae 0x40c803
lea eax, [ecx + 1]
cmp edx, 0x10
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x48]
cmovae eax, dword [ebp - 0x48]
mov word [eax + ecx], 0xa
jmp 0x40c815
push 0xa
mov byte [ebp - 0x10], 0
push dword [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x48]
call fcn.0040f910
movups xmm0, xmmword [ebp - 0x48]
lea eax, [ebp - 0x60]
push eax
movups xmmword [ebp - 0x60], xmm0
lea ecx, [ebp - 0x30]
movq xmm0, qword [ebp - 0x38]
movq qword [ebp - 0x50], xmm0
call fcn.0040e3c0
mov edx, dword [ebp - 0x4c]
cmp edx, 0x10
jb 0x40c867
mov ecx, dword [ebp - 0x60]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40c85d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cbff
push edx
push ecx
call fcn.0046a77c
add esp, 8
mov byte [ebp - 4], 0
lea eax, [ebp - 0x30]
cmp dword [ebp - 0x1c], 0x10
mov ecx, esi
push dword [ebp - 0x20]
cmovae eax, dword [ebp - 0x30]
push eax
call fcn.0040b840
test al, al
je 0x40cab7
lea eax, [esi + 0x30]
mov ecx, esi
push eax
call fcn.0040bad0
test al, al
je 0x40cab7
lea eax, [ebp - 0x14]
mov edi, 2
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x10], eax
push 0
push edi
push dword [ebp - 0x18]
push dword [esi + 0x60]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x40cae8
add dword [ebp - 0x18], eax
sub edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x10]
cmp eax, 0x7530
ja 0x40cae8
test edi, edi
jg 0x40c8b0
mov eax, 0x385
cmp word [ebp - 0x14], ax
jne 0x40cae8
cmp dword [esi + 0x58], 0
je 0x40ca92
lea eax, [esi + 0x48]
lea ecx, [ebp - 0x30]
cmp ecx, eax
je 0x40c91d
cmp dword [eax + 0x14], 0x10
mov ecx, eax
jb 0x40c911
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x30]
call fcn.0040ea50
lea edx, [ebp - 0x30]
lea ecx, [ebp - 0x60]
call fcn.0040b5e0
mov edx, dword [ebp - 0x4c]
cmp edx, 0x10
jb 0x40c95c
mov ecx, dword [ebp - 0x60]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40c952
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cbf0
push edx
push ecx
call fcn.0046a77c
add esp, 8
mov ecx, dword [ebp - 0x20]
mov eax, closesocket
sub eax, ecx
cmp eax, 5
jb 0x40cbf5
cmp dword [ebp - 0x1c], 0x10
lea eax, [ebp - 0x30]
push ecx
cmovae eax, dword [ebp - 0x30]
push eax
push 5
push str.use__
push ecx
push dword [ebp - 0x10]
lea ecx, [ebp - 0x48]
call fcn.0040ff90
push 0x4ad220
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 4
call fcn.0040e260
lea ecx, [ebp - 0x30]
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x60], xmm0
movq xmm0, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ebp - 0x60]
push eax
movq qword [ebp - 0x50], xmm0
call fcn.0040e3c0
mov edx, dword [ebp - 0x4c]
cmp edx, 0x10
jb 0x40ca02
mov ecx, dword [ebp - 0x60]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40c9f8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cbfa
push edx
push ecx
call fcn.0046a77c
add esp, 8
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x34]
cmp edx, 0x10
jb 0x40ca3a
mov ecx, dword [ebp - 0x48]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40ca30
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cbfa
push edx
push ecx
call fcn.0046a77c
add esp, 8
cmp dword [esi + 0x60], 0
je 0x40cab7
lea eax, [ebp - 0x30]
mov ecx, esi
push eax
call fcn.0040bad0
test al, al
jne 0x40ca69
mov ecx, esi
call fcn.0040c440
test eax, eax
jne 0x40ca96
lea eax, [ebp - 0x30]
mov ecx, esi
push eax
call fcn.0040bad0
test al, al
je 0x40cab7
push 0x60
call fcn.0046a4fb
add esp, 4
mov dword [ebp - 0x10], eax
push esi
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 5
push ecx
mov ecx, eax
call fcn.0040cf40
test eax, eax
je 0x40cab7
push ecx
mov ecx, eax
call fcn.0040cc10
xor esi, esi
jmp 0x40cabc
mov eax, dword [esi + 0x60]
cmp eax, 0xffffffff
je 0x40cab7
push 2
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [esi + 0x60]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x60], 0xffffffff
mov esi, 3
mov edx, dword [ebp - 0x1c]
cmp edx, 0x10
jb 0x40caf9
mov ecx, dword [ebp - 0x30]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40caef
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cbff
jmp 0x40caef
mov esi, 2
jmp 0x40cabc
push edx
push ecx
call fcn.0046a77c
add esp, 8
pop edi
mov eax, esi
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x94], 0
je 0x40cbbd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 7
lea edx, [eax*2 + str.Unable_to_connect_to_Acquire_Database_because]
xor eax, eax
mov ecx, edx
mov word [ebp - 0x48], ax
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40cb45
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x48]
call fcn.0040e8f0
mov dword [ebp - 4], 6
mov ecx, dword [esi + 0x94]
mov dword [ebp - 0x10], 0x3e7
test ecx, ecx
je 0x40cc04
mov eax, dword [ecx]
lea edx, [ebp - 0x48]
push edx
lea edx, [ebp - 0x10]
push edx
call dword [eax + 8]
mov edx, dword [ebp - 0x34]
cmp edx, 8
jb 0x40cbbd
mov ecx, dword [ebp - 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cbb3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cc09
push edx
push ecx
call fcn.0046a77c
add esp, 8
pop edi
mov eax, 1
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xc]
mov eax, 3
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
call fcn.0046fcb0
call fcn.0040a9a0
call fcn.0046fcb0
call fcn.0040a9a0
call fcn.0046fcb0
call fcn.0046fcb0
call fcn.004551e3
call fcn.0046fcb0
int3