Function at 0x409180
Capabilities:
Copy file
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x46f11f
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x483390]
xor eax, esp
mov dword [esp + 0x140], eax
push ebx
push esi
push edi
mov eax, dword [0x483390]
xor eax, esp
push eax
lea eax, [esp + 0x158]
mov dword fs:[0], eax
push str.CRsWork::DoInstall
push 0x473ab0
push 0x80
mov esi, ecx
call fcn.00431310
xor ebx, ebx
add esp, 0xc
cmp dword [esi + 0x24], ebx
je 0x4091f8
mov eax, dword [esi + 0x40]
push str.4150001
push eax
call fcn.004429b9
add esp, 8
cmp eax, ebx
jne 0x4091f8
mov dword [esi + 0x34], ebx
mov ecx, dword [esi + 0x14]
lea eax, [esp + 0x40]
push eax
push ecx
mov dword [esp + 0x48], ebx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [esp + 0x40], 0x103
jne 0x409221
mov edx, dword [esi + 0x14]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esi + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x18]
mov dword [esi + 0x14], ebx
cmp eax, ebx
je 0x409287
cmp dword [esi + 0x24], ebx
jne 0x40924b
mov ecx, dword [esi + 0x2c]
mov edx, dword [ecx]
push ebx
push eax
mov eax, dword [edx + 0x14]
push 0x463
call eax
mov ecx, dword [esi + 0x18]
push ecx
push str.RapInstall.exe_end__ErrorCode___d.
push 0x80
call fcn.00431310
add esp, 0xc
xor eax, eax
mov ecx, dword [esp + 0x158]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x140]
xor ecx, esp
call fcn.004426a0
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xa4]
sub eax, 0x10
call fcn.00403350
add eax, 0x10
mov dword [esp + 0x20], eax
mov dword [esp + 0x160], ebx
mov eax, dword [esi + 0x38]
sub eax, 0x10
call fcn.00403350
lea edi, [eax + 0x10]
mov dword [esp + 0x34], edi
mov byte [esp + 0x160], 1
cmp dword [edi - 0xc], ebx
push str.RapCustomConfig.ini
jle 0x409399
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x28]
call fcn.0040bfc0
add esp, 8
mov byte [esp + 0x160], 2
mov eax, dword [esp + 0x14]
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov edx, dword [0x4863c4]
mov ebx, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4863c4
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x160], 3
mov ecx, dword [esi + 0x3c]
push ecx
push 0x473164
lea edi, [esp + 0x20]
call fcn.004035e0
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
add esp, 8
push edx
push eax
push str.RAP_HOMEPAGE_DEFAULT_NUM
push str.RAP_CONFIG
call edi
cmp dword [esi + 0x34], 0
mov eax, str.true
jne 0x409353
mov eax, str.false
mov ecx, dword [esp + 0x14]
push ecx
push eax
push str.RAP_IS_LOCK_HOMEPAGE
push str.RAP_CONFIG
call edi
push ebx
push str.CopyFile_RapCustomConfig.ini_bflag___d...
push 0x80
call fcn.00431310
mov byte [esp + 0x16c], 2
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
add esp, 0xc
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x409468
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x28]
call fcn.0040bfc0
mov byte [esp + 0x168], 4
mov edx, dword [esp + 0x1c]
push 0x473f84
push edx
call fcn.00443d09
mov edi, eax
add esp, 0x10
cmp edi, ebx
je 0x4093df
push str.fopen_RapCustomConfig.ini_success...
push 0x80
call fcn.00431310
push edi
call fcn.00443ddd
add esp, 0xc
mov eax, dword [0x4863c4]
mov edx, dword [eax + 0xc]
mov ecx, 0x4863c4
call edx
add eax, 0x10
mov dword [esp + 0x28], eax
mov byte [esp + 0x160], 5
mov eax, dword [esi + 0x3c]
push eax
push 0x473164
lea edi, [esp + 0x30]
call fcn.004035e0
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x30]
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
add esp, 8
push ecx
push edi
push str.RAP_HOMEPAGE_DEFAULT_NUM
push str.RAP_CONFIG
call ebx
cmp dword [esi + 0x34], 0
mov eax, str.true
jne 0x40943e
mov eax, str.false
mov edx, dword [esp + 0x14]
push edx
push eax
push str.RAP_IS_LOCK_HOMEPAGE
push str.RAP_CONFIG
call ebx
lea eax, [edi - 0x10]
mov byte [esp + 0x160], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409474
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x160], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40949c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x2c]
push str.Custom.xml
push ecx
lea ecx, [esp + 0x28]
call fcn.0040bfc0
mov byte [esp + 0x168], 6
lea eax, [esi + 0x30]
mov dword [esp + 0x30], eax
mov eax, dword [eax]
add esp, 4
sub eax, 0x10
mov dword [esp + 0x40], esp
mov edi, esp
call fcn.00403350
add eax, 0x10
mov dword [edi], eax
mov byte [esp + 0x164], 7
mov eax, dword [esp + 0x30]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov edi, esp
call fcn.00403350
add eax, 0x10
mov dword [edi], eax
mov byte [esp + 0x168], 6
call fcn.00406b40
mov ebx, dword [esp + 0x28]
add ebx, 0xfffffff0
add esp, 8
mov eax, ebx
mov dword [esp + 0x1c], ebx
call fcn.00403350
lea edi, [eax + 0x10]
mov dword [esp + 0x14], edi
mov byte [esp + 0x160], 8
mov ecx, dword [edi - 8]
mov eax, 1
sub eax, dword [edi - 4]
or ecx, eax
jge 0x409545
xor ecx, ecx
lea eax, [esp + 0x14]
call fcn.004034e0
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashA]
push ecx
lea eax, [edi - 0x10]
mov dword [esp + 0x40], esp
mov dword [esp + 0x40], esp
mov dword [esp + 0x1c], eax
call fcn.00403350
add eax, 0x10
mov edx, esp
mov dword [edx], eax
call fcn.00409a80
test eax, eax
jne 0x409647
mov edi, dword [esi + 0x10]
push edi
push str.Init_comx3_failed._lastError___d.
push 0x80
call fcn.00431310
add esp, 0xc
cmp dword [esi + 0x24], 0
jne 0x4095a5
mov esi, dword [esi + 0x2c]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push 0
push edi
push 0x46c
mov ecx, esi
call edx
mov byte [esp + 0x160], 6
mov eax, dword [esp + 0x18]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4095ca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x160], 1
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4095f2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x160], 0
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40961a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x160], 0xffffffff
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409261
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
jmp 0x409261
cmp dword [edi - 8], 0
jl 0x4099fd
push 0x103
mov dword [edi - 0xc], 0
lea eax, [esp + 0x49]
push 0
mov byte [edi], 0
push eax
mov byte [esp + 0x50], 0
call fcn.00446e10
add esp, 0xc
lea ecx, [esp + 0x44]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [esp + 0x30]
push eax
mov ecx, str.__Silence__CustomCustom.xml
call fcn.00403130
lea ecx, [esp + 0x38]
push str._setup.exe
push ecx
lea ecx, [esp + 0x28]
mov byte [esp + 0x168], 9
call fcn.0040bfc0
lea edx, [esp + 0x2c]
mov byte [esp + 0x168], 0xa
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x40]
push edx
push 1
mov dword [esp + 0x34], 0xffffffff
call fcn.00407250
add esp, 0x10
test eax, eax
jne 0x409819
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esi + 0x24], 0
mov dword [esp + 0x24], eax
jne 0x40970a
mov ecx, dword [esi + 0x2c]
mov edx, dword [ecx]
push 0
push eax
mov eax, dword [edx + 0x14]
push 0x464
call eax
push str.RapInstall.exe_end__INSTALL_TO_UI_CREATE_SETUP_FAILED.
push 0x80
call fcn.00431310
add esp, 8
mov ecx, esi
call fcn.00408e90
mov byte [esp + 0x160], 9
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40974b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x160], 8
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409773
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x160], 6
mov eax, dword [esp + 0x18]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409798
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x160], 1
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4097c0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x160], 0
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4097e8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x160], 0xffffffff
mov eax, dword [esp + 0x1c]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409261
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x409261
lea ecx, [esp + 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40988a
cmp dword [esi + 0x24], 0
mov dword [esi + 0x7c], eax
jne 0x409847
mov ecx, dword [esi + 0x2c]
mov edx, dword [ecx]
push 0
push eax
mov eax, dword [edx + 0x14]
push 0x465
call eax
mov ecx, dword [esi + 0x7c]
push ecx
push str.CRsWork::DoInstall
push str._s_setup_return__d
push 0x80
call fcn.00431310
add esp, 0x10
mov ecx, esi
call fcn.00408e90
mov byte [esp + 0x160], 9
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40973f
mov ecx, esi
call fcn.00408e90
mov ecx, dword [esi + 0xb8]
cmp dword [ecx - 0xc], 0
jle 0x4098d8
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x1c]
push str.NetConfig.ini
push edx
call fcn.0040bfc0
mov ecx, dword [esp + 0x24]
mov eax, dword [esi + 0xb8]
add esp, 8
push ecx
push eax
push str.PATH
push str.LocalAutoUpdate
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea ecx, [esp + 0x1c]
call fcn.004031d0
cmp dword [esi + 0x24], 0
jne 0x4099bd
mov ecx, dword [esi + 0x2c]
mov eax, dword [esp + 0x24]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
push 0
push eax
push 0x469
call edx
cmp dword [esi + 0x44], 0
jne 0x40995f
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x18]
push str._regguide.exe
push eax
call fcn.0040bfc0
lea ecx, [esp + 0x2c]
push ecx
mov byte [esp + 0x16c], 0xb
mov ebx, dword [esp + 0x24]
push 1
xor edi, edi
call fcn.00407250
add esp, 0x10
test eax, eax
je 0x40994e
mov edx, dword [esp + 0x18]
push edx
push str.CRsWork::DoInstall
push str._s___RunApp__s_success
push 0x80
call fcn.00431310
add esp, 0x10
lea ecx, [esp + 0x18]
mov byte [esp + 0x160], 0xa
call fcn.004031d0
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x1c]
push str._rsmain.exe
push eax
call fcn.0040bfc0
lea ecx, [esp + 0x2c]
push ecx
mov byte [esp + 0x16c], 0xc
mov ebx, dword [esp + 0x28]
push 0
xor edi, edi
call fcn.00407250
add esp, 0x10
test eax, eax
je 0x40999e
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esi + 0x2c]
mov eax, dword [esp + 0x24]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
push 0
push eax
push 0x46a
call edx
lea ecx, [esp + 0x1c]
call fcn.004031d0
lea ecx, [esp + 0x38]
call fcn.004031d0
lea ecx, [esp + 0x30]
call fcn.004031d0
lea ecx, [esp + 0x14]
call fcn.004031d0
lea ecx, [esp + 0x2c]
call fcn.004031d0
lea ecx, [esp + 0x34]
call fcn.004031d0
lea ecx, [esp + 0x20]
call fcn.004031d0
mov eax, 1
jmp 0x409263
push 0x80070057
call fcn.00401000
int3