Function at 0x41ddf0
Capabilities:
Get local ipv4 addresses
Get socket information
Read .ini file
Read and send data from client to server
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x160
mov eax, dword [0x58c758]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x160], ecx
mov eax, dword [ebp - 0x160]
cmp dword [eax], 0
je 0x41de20
mov ecx, dword [ebp - 0x160]
cmp dword [ecx + 0x14], 0xffffffff
jne 0x41de27
xor eax, eax
jmp 0x41e069
mov edx, dword [ebp - 0x160]
cmp dword [edx + 8], 0
je 0x41de3d
mov eax, 1
jmp 0x41e069
mov byte [ebp - 0x158], 0
xor eax, eax
mov dword [ebp - 0x157], eax
mov dword [ebp - 0x153], eax
mov dword [ebp - 0x14f], eax
mov dword [ebp - 0x14b], eax
mov dword [ebp - 0x147], eax
mov dword [ebp - 0x143], eax
mov dword [ebp - 0x13f], eax
mov word [ebp - 0x13b], ax
mov byte [ebp - 0x139], al
mov byte [ebp - 0x138], 0
push 0x103
push 0
lea ecx, [ebp - 0x137]
push ecx
call fcn.004b0ac0
add esp, 0xc
push 0
push 0
push 0x104
lea edx, [ebp - 0x138]
push edx
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x160]
add ecx, 0x20
call fcn.0043e290
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x41ded0
xor eax, eax
jmp 0x41e069
lea eax, [ebp - 0x138]
push eax
push 0x20
lea ecx, [ebp - 0x158]
push ecx
push 0x5412f4
push str.Server
push str.Proxy
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edx, [ebp - 0x158]
push edx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
jne 0x41df12
xor eax, eax
jmp 0x41e069
cmp dword [0x58f704], 3
jl 0x41df46
mov eax, dword [ebp - 0x160]
cmp dword [eax + 0x1c], 0xa
jge 0x41df3c
mov ecx, dword [ebp - 0x160]
mov edx, dword [ecx + 0x1c]
add edx, 1
mov eax, dword [ebp - 0x160]
mov dword [eax + 0x1c], edx
mov dword [0x58f704], 0
xor ecx, ecx
mov word [ebp - 0x14], cx
xor edx, edx
mov dword [ebp - 0x12], edx
mov dword [ebp - 0xe], edx
mov dword [ebp - 0xa], edx
mov word [ebp - 6], dx
mov eax, 2
mov word [ebp - 0x14], ax
mov ecx, dword [0x58f704]
movzx edx, word [ecx*4 + 0x58a020]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x10], eax
mov ecx, dword [0x58f704]
add ecx, 1
mov dword [0x58f704], ecx
cmp dword [0x58fb50], 0
je 0x41dfd0
movzx edx, word [ebp - 0x12]
push edx
call dword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
push eax
movzx ecx, byte [ebp - 0xd]
push ecx
movzx edx, byte [ebp - 0xe]
push edx
movzx eax, byte [ebp - 0xf]
push eax
movzx ecx, byte [ebp - 0x10]
push ecx
push 0x542084
push 0x58f750
call fcn.004045b0
add esp, 0x1c
mov dword [ebp - 0x2c], 0
lea ecx, [ebp - 0x24]
call fcn.0041e690
push 0x10
lea edx, [ebp - 0x14]
push edx
push 0
mov eax, dword [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x160]
mov eax, dword [edx + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
je 0x41e00b
mov dword [ebp - 0x2c], 1
mov ecx, dword [ebp - 0x160]
cmp dword [ecx + 4], 0
jne 0x41e066
mov dword [ebp - 0x15c], 0x10
lea edx, [ebp - 0x15c]
push edx
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x160]
mov edx, dword [ecx + 0x14]
push edx
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x41e066
push 0x10
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x160]
add ecx, 0x28
push ecx
call fcn.004b1320
add esp, 0xc
mov edx, dword [ebp - 0x160]
mov dword [edx + 4], 1
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b0a79
mov esp, ebp
pop ebp
ret