Function at 0x4227a0
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
sub esp, 0x408
mov eax, dword [0x4b445c]
xor eax, esp
mov dword [esp + 0x404], eax
mov eax, dword [esp + 0x410]
push ebx
mov ebx, dword [esp + 0x410]
mov dword [esp + 4], eax
push ebp
mov ebp, dword [esp + 0x424]
mov eax, ebx
sub eax, 1
push esi
mov esi, ecx
je 0x422803
sub eax, 1
je 0x4227fc
sub eax, 1
je 0x4227f5
push str.DLL_CreateServer_failed_1_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x4229c8
push str.VoIPLib.dll
jmp 0x422808
push str.ChatLib.dll
jmp 0x422808
push str.FileTransferLib.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [esi + 8], eax
push edi
je 0x4229ba
cmp ebx, 3
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
jne 0x42287b
push str.CreateVoIPServer
push eax
call edi
mov ecx, dword [esi + 8]
push str.StopVoIPServer
push ecx
mov dword [esi + 0x34], eax
call edi
mov ecx, dword [esi + 0x34]
test ecx, ecx
mov dword [esi + 0x3c], eax
je 0x4229b1
test eax, eax
je 0x4229b1
mov edx, dword [esp + 0x428]
mov eax, dword [esp + 0x10]
push edx
mov edx, dword [esp + 0x428]
push eax
push edx
call ecx
add esp, 0xc
test al, al
je 0x422964
lea eax, [ebx - 2]
jmp 0x4229c7
cmp ebx, 2
jne 0x4228d8
push str.CreateChatServer
push eax
call edi
mov dword [esi + 0x24], eax
mov eax, dword [esi + 8]
push str.StopChatServer
push eax
call edi
mov ecx, dword [esi + 0x24]
test ecx, ecx
mov dword [esi + 0x2c], eax
je 0x4229b1
test eax, eax
je 0x4229b1
mov edx, dword [esp + 0x428]
mov eax, dword [esp + 0x10]
push edx
mov edx, dword [esp + 0x428]
push eax
push edx
call ecx
add esp, 0xc
test al, al
je 0x422964
mov eax, 1
jmp 0x4229c7
push str.CreateFileServer
push eax
call edi
mov dword [esi + 0x10], eax
mov eax, dword [esi + 8]
push str.StopFileServer
push eax
call edi
mov ecx, dword [esi + 8]
push str.ReBuildConnect
push ecx
mov dword [esi + 0x18], eax
call edi
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x10]
test eax, eax
je 0x42296f
cmp dword [esi + 0x18], 0
je 0x42296f
mov edx, dword [esp + 0x428]
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x424]
push ebp
push edx
push ecx
push edi
call eax
add esp, 0x10
test eax, eax
jne 0x4228ce
push 0x3ff
push eax
lea edx, [esp + 0x1d]
push edx
mov byte [esp + 0x20], al
call fcn.0045eb50
mov eax, dword [esp + 0x1c]
push ebp
push ebx
push eax
push edi
lea ecx, [esp + 0x30]
push str.DLLCreateServer_failed__m_funcCreateFileServer_._nPort:_d__hCallerWnd:_d__nServerType:_d__Language:_s_n
push ecx
call fcn.0045f1a1
add esp, 0x24
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 1
mov ecx, esi
call fcn.00422570
jmp 0x4229c5
push 0x3ff
lea eax, [esp + 0x19]
push 0
push eax
mov byte [esp + 0x20], 0
call fcn.0045eb50
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x430]
push ebp
push ebx
push ecx
push edx
lea eax, [esp + 0x30]
push str.DLLCreateServer_failed_m_funcCreateFileServer__NULL__m_funcStopFileServer__NULL_._nPort:_d__hCallerWnd:_d__nServerType:_d__Language:_s_n
push eax
call fcn.0045f1a1
add esp, 0x24
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, esi
call fcn.004223c0
jmp 0x4229c5
push str.Fail_to_load_dll.
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
pop edi
mov ecx, dword [esp + 0x410]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0045e17e
add esp, 0x408
ret 0x14