Function at 0x401e06
Capabilities:
Copy file
Create process on windows
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3d4
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x3d0], eax
push ebx
push esi
push edi
push 0x3f
lea eax, [esp + 0x85]
mov byte [esp + 0x84], 0
push 0
push eax
call fcn.004075d0
add esp, 0xc
mov byte [esp + 0xc0], 0
lea eax, [esp + 0xc1]
xor ebx, ebx
inc ebx
push 0x103
push 0
push eax
call fcn.004075d0
and dword [esp + 0x44], 0
lea eax, [esp + 0x48]
add esp, 0xc
push 0x40
pop esi
push esi
push 0
push eax
call fcn.004075d0
and dword [esp + 0x34], 0
lea edi, [esp + 0x38]
xor eax, eax
add esp, 0xc
stosd dword es:[edi], eax
mov ecx, str._nodel
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.00401d76
mov ecx, str._ghost
mov dword [esp + 0x14], eax
call fcn.00401d76
mov edi, eax
mov ecx, str._stop
mov dword [esp + 0x24], edi
call fcn.00401d76
mov ecx, str._service
mov dword [esp + 0x1c], eax
call fcn.00401d76
mov ecx, str._norunonce
mov dword [esp + 0x20], eax
call fcn.00401d76
mov ecx, 0x4130c4
mov dword [esp + 0x18], eax
call fcn.00401d76
test eax, eax
je 0x401f17
push str._unattid
lea eax, [esp + 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x80]
push esi
push eax
call fcn.00403a78
sub esi, eax
lea edx, [esp + 0x88]
push esi
add edx, eax
mov ecx, 0x4130c4
call fcn.00401dab
add esp, 0xc
xor esi, esi
mov ecx, str._app
mov dword [esp + 0x10], esi
call fcn.00401d76
test eax, eax
je 0x401f7b
push 0xa
push 0x7d00
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [0x415e64], eax
test eax, eax
je 0x401f49
call fcn.004018a6
jmp 0x401f4b
xor eax, eax
test eax, eax
je 0x401f7b
push ecx
push ecx
call fcn.00402e7f
pop ecx
pop ecx
call fcn.004018ea
push 0
push str.LMI_InstantChat_srv.exe
push dword [0x4150c0]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov ecx, dword [str.lmi_instantchat.exe.manifest]
call fcn.00401889
mov ecx, str._params
call fcn.00401d76
test eax, eax
je 0x40203e
push 1
xor ebx, ebx
mov edx, str.eula.txt
push ebx
mov ecx, 0x2717
call fcn.00401917
pop ecx
pop ecx
mov edx, 0x412e7d
call fcn.00401bac
cmp dword [esp + 0x14], ebx
je 0x401fbd
mov edx, str._nodel
call fcn.00401bac
cmp dword [esp + 0x18], ebx
je 0x401fcd
mov edx, str._norunonce
call fcn.00401bac
test edi, edi
je 0x401ff0
mov edx, str._ghost
call fcn.00401bac
cmp byte [esp + 0x80], bl
je 0x401ff0
lea edx, [esp + 0x80]
call fcn.00401bac
push ebx
push ebx
mov edx, str.params.txt
mov ecx, 0x2710
call fcn.00401917
xor ecx, ecx
call fcn.00401c5a
xor ecx, ecx
call fcn.00401d0b
mov edx, 0x2712
mov edi, str.script
push 1
push edi
lea ecx, [edx + 1]
call fcn.00401917
mov edx, 0x2714
push 1
push edi
lea ecx, [edx + 1]
call fcn.00401917
add esp, 0x18
xor eax, eax
jmp 0x4022f6
mov ecx, str._app
call fcn.00401d76
test eax, eax
jne 0x402037
mov edi, str.script
mov ecx, 0x41310c
call fcn.00401d76
test eax, eax
je 0x402086
push 0x104
lea edx, [esp + 0x1cc]
mov ecx, 0x41310c
call fcn.00401dab
pop ecx
lea eax, [esp + 0x1c8]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
jmp 0x4020c9
push ecx
push ecx
lea eax, [esp + 0x1d0]
push eax
lea edx, [esp + 0x2dc]
lea ecx, [esp + 0x1c]
call fcn.004016de
add esp, 0xc
test eax, eax
je 0x4020c5
push dword [eax*4 + 0x41325c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004017ef
mov esi, dword [esp + 0x18]
pop ecx
pop ecx
jmp 0x402295
mov esi, dword [esp + 0x10]
push 0xa
push 0x7d00
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [0x415e64], eax
test eax, eax
je 0x4020e8
call fcn.004018a6
jmp 0x4020ea
xor eax, eax
test eax, eax
jne 0x402106
push str.Failed_to_locate_application_resource.
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004017ef
pop ecx
pop ecx
jmp 0x402295
push ecx
push ecx
call fcn.00402e7f
pop ecx
pop ecx
test eax, eax
jne 0x402121
push 2
pop esi
mov dword [esp + 0x10], esi
push str.Failed_to_decompress_application_files.
jmp 0x4020f3
push 0
push str.LMI_InstantChat_srv.exe
push dword [0x4150c0]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40213f
push str.Failed_to_copy_service_binary.
jmp 0x4020f3
mov ecx, dword [str.lmi_instantchat.exe.manifest]
call fcn.00401889
test eax, eax
jne 0x402155
push str.Failed_to_copy_service_manifest.
jmp 0x4020f3
call fcn.004018ea
push 1
push 0
mov edx, str.eula.txt
mov ecx, 0x2717
call fcn.00401917
mov ebx, dword [esp + 0x28]
pop ecx
pop ecx
test ebx, ebx
jne 0x4021de
mov edx, 0x412e7d
call fcn.00401bac
cmp dword [esp + 0x14], ebx
je 0x402191
mov edx, str._nodel
call fcn.00401bac
cmp dword [esp + 0x18], 0
je 0x4021a2
mov edx, str._norunonce
call fcn.00401bac
cmp dword [esp + 0x24], 0
je 0x4021c9
mov edx, str._ghost
call fcn.00401bac
cmp byte [esp + 0x80], 0
je 0x4021c9
lea edx, [esp + 0x80]
call fcn.00401bac
push 0
push 0
mov edx, str.params.txt
mov ecx, 0x2710
call fcn.00401917
pop ecx
pop ecx
mov ecx, ebx
call fcn.00401c5a
mov ecx, ebx
call fcn.00401d0b
test ebx, ebx
jne 0x402213
mov edx, 0x2712
push 1
push edi
lea ecx, [edx + 1]
call fcn.00401917
mov edx, 0x2714
push 1
push edi
lea ecx, [edx + 1]
call fcn.00401917
add esp, 0x10
xor ebx, ebx
cmp dword [esp + 0x1c], ebx
jne 0x40228e
push dword [0x4150c0]
lea eax, [esp + 0x1cc]
push eax
lea eax, [esp + 0xc8]
push str.__s_s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov dword [esp + 0x38], 0x44
lea eax, [esp + 0x28]
xor ecx, ecx
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x1d0]
push eax
push ecx
push ecx
push ecx
push ecx
push ecx
lea eax, [esp + 0xe0]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x40228e
cmp esi, 1
jle 0x40228b
push str.Failed_to_start_client_application.
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004017ef
pop ecx
pop ecx
push 2
pop ebx
push 2
pop esi
mov dword [esp + 0x10], esi
call fcn.004018ea
cmp dword [esp + 0x2c], 0
je 0x4022b0
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esp + 0x2c], 0
cmp dword [esp + 0x28], 0
je 0x4022c6
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esp + 0x28], 0
cmp esi, 2
jl 0x402051
push 0x104
lea eax, [esp + 0xc4]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4022f4
lea ecx, [esp + 0xc0]
call fcn.004011e2
mov eax, ebx
mov ecx, dword [esp + 0x3dc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00403259
mov esp, ebp
pop ebp
ret