Function at 0x408200
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x208
mov eax, dword [0x4237c8]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push edi
push eax
push 0
push str.HostNum
push 0x4202f4
mov ebx, ecx
call esi
xor ebp, ebp
mov dword [esp + 0x10], eax
test eax, eax
jbe 0x408413
mov edi, dword [esp + 0x21c]
cmp dword [edi], 0
je 0x4082d0
push ebp
lea ecx, [esp + 0x1c]
push str.PORT_d
push ecx
call fcn.004151c1
mov edx, dword [0x4237c8]
add esp, 0xc
lea eax, [esp + 0x18]
push edx
push 0x1965
push eax
push str.HOST
call esi
cmp eax, dword [edi + 4]
jne 0x4082cc
push ebp
lea ecx, [esp + 0x1c]
push str.IP_d
push ecx
call fcn.004151c1
mov edx, dword [0x4237c8]
add esp, 0xc
lea eax, [esp + 0x118]
lea ecx, [esp + 0x18]
push edx
push pe_nt_image_headers32
push eax
push 0x4237d4
push ecx
push str.HOST
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp eax, 1
jb 0x4082cc
mov edx, dword [edi]
lea eax, [esp + 0x118]
push edx
push eax
call fcn.0041be80
add esp, 8
test eax, eax
je 0x4082e6
mov eax, dword [esp + 0x10]
inc ebp
cmp ebp, eax
jb 0x40823b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 4
push ebp
lea ecx, [esp + 0x1c]
push str.StartPort_d
push ecx
call fcn.004151c1
mov edx, dword [0x4237c8]
add esp, 0xc
lea eax, [esp + 0x18]
push edx
push 1
push eax
push str.HOST
call esi
push ebp
lea ecx, [esp + 0x1c]
push str.EndPort_d
push ecx
mov esi, eax
call fcn.004151c1
mov edx, dword [0x4237c8]
add esp, 0xc
lea eax, [esp + 0x18]
push edx
push 0
push eax
push str.HOST
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ecx, dword [edi + 0xc]
inc eax
add ecx, esi
mov dword [esp + 0x10], eax
cmp eax, ecx
mov dword [esp + 0x14], eax
jb 0x408352
mov dword [esp + 0x14], ecx
cmp esi, dword [esp + 0x14]
jae 0x4083d2
xor ebp, ebp
mov edx, dword [ebx + 0xc]
mov ecx, dword [edx + esi*4]
test ecx, ecx
je 0x4083c9
mov eax, dword [edi + 8]
xor edx, edx
mov dx, word [eax + ebp + 0x40]
mov dword [ecx + 0x4c], edx
mov ecx, dword [ebx + 0xc]
mov eax, dword [edi + 8]
mov ecx, dword [ecx + esi*4]
add eax, ebp
add ecx, 0x60
mov dl, byte [eax]
inc eax
mov byte [ecx], dl
inc ecx
test dl, dl
jne 0x40837f
mov edx, dword [edi + 8]
mov ecx, dword [ebx + 0xc]
xor eax, eax
mov ax, word [edx + ebp + 0x40]
mov edx, dword [ecx + esi*4]
add ebp, 0x44
mov dword [edx + 0x50], eax
mov ecx, dword [ebx + 0xc]
mov eax, dword [edi + 8]
mov edx, dword [ecx + esi*4]
mov al, byte [eax + ebp - 2]
mov byte [edx + 0xa1], al
mov edx, dword [ebx + 0xc]
mov ecx, dword [edi + 8]
mov eax, dword [edx + esi*4]
mov cl, byte [ecx + ebp - 1]
mov byte [eax + 0xa2], cl
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
inc esi
cmp esi, ecx
jb 0x40835a
cmp esi, eax
jae 0x408413
mov edx, dword [ebx + 0xc]
mov ecx, dword [edx + esi*4]
test ecx, ecx
je 0x4083f2
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebx + 0xc]
mov eax, dword [esp + 0x10]
mov dword [ecx + esi*4], 0
mov edx, dword [ebx + 8]
mov ecx, dword [edx + esi*4]
test ecx, ecx
je 0x40840e
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebx + 8]
mov eax, dword [esp + 0x10]
mov dword [ecx + esi*4], 0
inc esi
cmp esi, eax
jb 0x4083d6
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 4