Function at 0x405f50
Capabilities:
Read .ini file

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x41c37e
push eax
mov eax, 0x1224
mov dword fs:[0], esp
call fcn.004154c0
mov eax, dword [0x4237c8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push ebp
push esi
push edi
push eax
push 0
push str.nTotalChannel
push 0x4202f4
mov esi, ecx
call ebx
cmp eax, 1
mov dword [esi + 4], eax
jb 0x40636d
lea ecx, [eax*4]
push ecx
call fcn.004150af
mov edx, dword [esi + 4]
mov dword [esi + 0xc], eax
shl edx, 2
push edx
call fcn.004150af
mov ecx, dword [esi + 4]
mov dword [esi + 8], eax
add esp, 8
xor eax, eax
test ecx, ecx
jbe 0x405fe4
mov ecx, dword [esi + 0xc]
inc eax
mov dword [ecx + eax*4 - 4], 0
mov edx, dword [esi + 8]
mov dword [edx + eax*4 - 4], 0
mov ecx, dword [esi + 4]
cmp eax, ecx
jb 0x405fc6
mov eax, dword [0x4237c8]
push eax
push 0
push str.HostNum
push 0x4202f4
call ebx
mov ecx, dword [0x4237c8]
mov ebp, eax
push ecx
push 1
push str.Protocol
push 0x4202f4
mov dword [esp + 0x30], ebp
call ebx
xor edi, edi
mov dword [esp + 0x24], eax
test ebp, ebp
mov dword [esp + 0x1c], edi
jbe 0x4062cd
push edi
lea edx, [esp + 0x34]
push str.IP_d
push edx
call fcn.004151c1
mov eax, dword [0x4237c8]
add esp, 0xc
lea ecx, [esp + 0x130]
lea edx, [esp + 0x30]
push eax
push pe_nt_image_headers32
push ecx
push 0x4237d4
push edx
push str.HOST
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp eax, 1
jb 0x4062bc
push edi
lea eax, [esp + 0x34]
push str.StartPort_d
push eax
call fcn.004151c1
mov ecx, dword [0x4237c8]
add esp, 0xc
lea edx, [esp + 0x30]
push ecx
push 1
push edx
push str.HOST
call ebx
mov ebp, eax
push edi
lea eax, [esp + 0x34]
push str.EndPort_d
push eax
call fcn.004151c1
mov ecx, dword [0x4237c8]
add esp, 0xc
lea edx, [esp + 0x30]
push ecx
push 0
push edx
push str.HOST
call ebx
mov ebx, eax
cmp ebp, ebx
jbe 0x4060f7
mov ecx, dword [0x4237c4]
lea eax, [esp + 0x30]
push pe_nt_image_headers32
push eax
push 0x93
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
lea edx, [esp + 0x230]
lea eax, [esp + 0x30]
push edx
push eax
call fcn.00405a30
add esp, 8
jmp 0x4062b6
push edi
lea ecx, [esp + 0x34]
push str.PORT_d
push ecx
call fcn.004151c1
mov edx, dword [0x4237c8]
add esp, 0xc
lea eax, [esp + 0x30]
push edx
push 0x1965
push eax
push str.HOST
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push edi
lea ecx, [esp + 0x34]
push str.UserNum_d
push ecx
mov dword [esp + 0x20], eax
inc ebx
call fcn.004151c1
mov edx, dword [0x4237c8]
add esp, 0xc
lea eax, [esp + 0x230]
lea ecx, [esp + 0x30]
push edx
push 0x1001
push eax
push 0
push ecx
push str.HOST
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov byte [esp + eax + 0x230], 0
mov eax, ebx
sub eax, ebp
mov dword [esp + 0x2c], eax
lea edx, [eax*4]
push edx
call fcn.004150af
push 0xff
mov dword [esp + 0x20], eax
push eax
lea eax, [esp + 0x38]
lea ecx, [esp + 0x23c]
push eax
push ecx
call fcn.00401e50
add esp, 0x14
cmp ebp, ebx
jae 0x406296
mov edx, dword [esp + 0x18]
or eax, 0xffffffff
sub eax, ebp
mov dword [esp + 0x10], edx
mov dword [esp + 0x28], eax
mov eax, dword [esi + 8]
lea edi, [ebp*4]
cmp dword [edi + eax], 0
jne 0x406245
mov ecx, dword [esi + 0xc]
cmp dword [edi + ecx], 0
jne 0x406245
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, dword [edx]
mov edx, dword [esp + 0x24]
push eax
push ecx
push edx
push 1
push ebp
mov ecx, esi
call fcn.00406430
mov eax, dword [esi + 0xc]
push 0x405b80
add eax, edi
push eax
call dword [sym.imp.VirtualNetPlay.dll_FactroyVirtualNetPlayer]
mov ecx, dword [esi + 0xc]
mov eax, dword [edi + ecx]
test eax, eax
je 0x40627e
mov dword [eax + 4], ebp
mov eax, dword [esi + 0xc]
lea edx, [esp + 0x130]
mov eax, dword [edi + eax]
add eax, 8
mov cl, byte [edx]
inc edx
mov byte [eax], cl
inc eax
test cl, cl
jne 0x40621b
mov ecx, dword [esi + 0xc]
mov eax, dword [esp + 0x14]
mov edx, dword [edi + ecx]
mov ecx, dword [esp + 0x28]
mov dword [edx + 0x48], eax
mov eax, dword [esi + 0xc]
lea edx, [ecx + ebp + 1]
mov ecx, dword [edi + eax]
mov dword [ecx + 0x4c], edx
jmp 0x40627e
push 0x32
push 0x2bc
call dword [sym.imp.KERNEL32.dll_Beep]
mov eax, dword [0x4237c4]
lea edx, [esp + 0x30]
push pe_nt_image_headers32
push edx
push 0x94
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [ebp + 1]
lea edx, [esp + 0x30]
push ecx
push edx
call fcn.00405a30
add esp, 8
mov ecx, dword [esp + 0x10]
inc ebp
add ecx, 4
cmp ebp, ebx
mov dword [esp + 0x10], ecx
jb 0x4061b9
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push eax
call fcn.00415417
mov ecx, dword [esp + 0x18]
add esp, 4
lea edx, [esp + 0x130]
push ecx
push edx
call dword [sym.imp.VirtualNetPlay.dll_ConnectVirtualHost]
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov eax, dword [esp + 0x20]
inc edi
cmp edi, eax
mov dword [esp + 0x1c], edi
jb 0x406025
push 0x1c
call fcn.004150af
add esp, 4
mov dword [esp + 0x20], eax
xor ebp, ebp
cmp eax, ebp
mov dword [esp + 0x123c], ebp
je 0x4062f1
mov ecx, eax
call fcn.0040af20
jmp 0x4062f3
xor eax, eax
mov dword [esi + 0x14], eax
mov eax, dword [0x4237c8]
push eax
push 0x1965
push str.ServerPort
push 0x4202f4
mov dword [esp + 0x124c], 0xffffffff
call ebx
mov ecx, dword [esi + 0x14]
mov edi, eax
push edi
call fcn.0040b0d0
mov ebx, eax
cmp ebx, ebp
je 0x406366
mov ecx, dword [esi + 0x14]
cmp ecx, ebp
je 0x406336
mov edx, dword [ecx]
push 1
call dword [edx]
lea eax, [esp + 0x30]
mov dword [esi + 0x14], ebp
mov ecx, dword [0x4237c4]
push pe_nt_image_headers32
push eax
push 0x92
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
push ebx
lea edx, [esp + 0x34]
push edi
push edx
call fcn.00405a30
add esp, 0xc
jmp 0x40636d
mov dword [esi + 0x10], 1
mov ecx, dword [esp + 0x1234]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1230
ret