Function at 0x413110
Capabilities:
Get common file path
Move file
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50fc64
mov eax, dword fs:[0]
push eax
mov eax, 0x6128
call fcn.0050c2d0
mov eax, dword [0x551aa8]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, ecx
push str.ApplyCopyList
mov dword [ebp - 0x6134], ebx
mov dword [ebp - 0x612c], eax
mov dword [ebp - 0x6128], 1
call fcn.004172c0
mov ecx, dword [ebx + 0x80]
sub ecx, dword [ebx + 0x7c]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
xor esi, esi
add ecx, edx
add esp, 4
mov dword [ebp - 0x6120], esi
test ecx, ecx
jle 0x413465
mov dword [ebp - 0x6124], esi
push 0x103
lea edx, [ebp - 0x11b]
push 0
push edx
mov byte [ebp - 0x11c], 0
call sub.MSVCR100.dll_memset
mov eax, dword [ebx + 0x7c]
add eax, esi
mov edi, 0x10
add esp, 0xc
cmp dword [eax + 0x14], edi
jb 0x4131ca
mov eax, dword [eax]
push eax
push 0x5450d8
lea edx, [ebp - 0x11c]
call fcn.00414270
mov eax, dword [ebp - 0x612c]
add esp, 8
lea edx, [ebp - 0x11c]
call fcn.00422740
mov dword [ebp - 0x6130], eax
test eax, eax
je 0x41342b
push 0x1fff
lea eax, [ebp - 0x611b]
push 0
push eax
mov byte [ebp - 0x611c], 0
call sub.MSVCR100.dll_memset
add esp, 0xc
push 0x1fff
lea ecx, [ebp - 0x211b]
push 0
push ecx
mov byte [ebp - 0x211c], 0
call sub.MSVCR100.dll_memset
lea eax, [ebp - 0x611c]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x413240
mov ecx, dword [ebx + 0x7c]
add ecx, esi
sub eax, edx
cmp dword [ecx + 0x14], edi
jb 0x413255
mov ecx, dword [ecx]
lea edi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x413258
sub ecx, edi
cmp eax, 0x104
jg 0x413270
cmp ecx, 0x104
jle 0x41327d
push str.nSize1____MAX_PATH__nSize2____MAX_PATH
call fcn.004172c0
add esp, 4
mov eax, dword [ebx + 0x7c]
add eax, esi
cmp dword [eax + 0x14], 0x10
jb 0x41328a
mov eax, dword [eax]
mov esi, eax
lea edi, [ebp - 0x611c]
call fcn.00425080
mov esi, dword [ebx + 0x7c]
mov edi, dword [ebp - 0x6124]
add esi, edi
call fcn.004244f0
mov eax, dword [ebx + 0x7c]
add eax, edi
cmp dword [eax + 0x14], 0x10
jb 0x4132b4
mov eax, dword [eax]
mov edi, dword [sym.imp.MSVCR100.dll__stricmp]
push 0x5441e4
push eax
call edi
add esp, 8
test eax, eax
jne 0x413316
mov ecx, str.dnlauncher.tmp
call fcn.004145f0
push 0
push 0x5441e4
call dword [sym.imp.MSVCR100.dll__access]
add esp, 8
test eax, eax
jne 0x4132ff
push str.dnlauncher.tmp
push 0x542e20
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x413489
push str.Apply_Launcher_Patch
call fcn.004172c0
add esp, 4
mov dword [ebp - 0x6128], 2
cmp byte [ebp - 0x611c], 0
je 0x4133be
lea edx, [ebp - 0x611c]
push edx
call fcn.00425310
add esp, 4
lea eax, [ebp - 0x211c]
push eax
push 0x2000
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x1fff
lea ecx, [ebp - 0x411b]
push 0
push ecx
mov byte [ebp - 0x411c], 0
call sub.MSVCR100.dll_memset
add esp, 0xc
lea edx, [ebp - 0x211c]
push edx
lea eax, [ebp - 0x411c]
push 0x2000
push eax
call dword [sym.imp.MSVCR100.dll_strcpy_s]
mov esi, dword [sym.imp.MSVCR100.dll_strcat_s]
add esp, 0xc
push 0x545020
lea ecx, [ebp - 0x411c]
push 0x2000
push ecx
call esi
add esp, 0xc
lea edx, [ebp - 0x611c]
push edx
lea eax, [ebp - 0x411c]
push 0x2000
push eax
call esi
add esp, 0xc
lea ecx, [ebp - 0x411c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov esi, dword [ebp - 0x6130]
call fcn.00421c70
test al, al
je 0x413587
cmp byte [ebp - 0x611c], 0
je 0x4133e7
lea edx, [ebp - 0x211c]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [esi]
mov edx, dword [eax]
push 1
mov ecx, esi
call edx
inc dword [ebx + 0x9c]
mov eax, dword [ebx + 0x9c]
cdq
mov dword [0x55c558], eax
mov dword [0x55c55c], edx
mov eax, dword [ebx + 0xa0]
cdq
mov dword [0x55c560], eax
mov dword [0x55c564], edx
cmp dword [ebx + 0x48], 0
jne 0x413712
mov esi, dword [ebp - 0x6124]
mov ecx, dword [ebx + 0x80]
sub ecx, dword [ebx + 0x7c]
mov edi, dword [ebp - 0x6120]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
inc edi
add esi, 0x1c
add eax, edx
mov dword [ebp - 0x6120], edi
mov dword [ebp - 0x6124], esi
cmp edi, eax
jl 0x41319c
mov eax, dword [ebp - 0x6128]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0050bf32
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x6120]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov dword [ebp - 4], 0
test byte [0x56c888], 1
jne 0x4134be
or dword [0x56c888], 1
call fcn.0040bb80
push 0x5107b0
call fcn.0050c11f
add esp, 4
mov edi, dword [0x56c860]
lea ecx, [ebp - 0x6128]
add edi, 0x3fc
push ecx
call fcn.00414580
add esp, 4
mov byte [ebp - 4], 1
mov edx, dword [eax]
push 1
push edx
lea eax, [ebp - 0x6120]
push str._s__d
push eax
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0x10
lea ecx, [ebp - 0x6128]
mov byte [ebp - 4], 0
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x6120]
push ecx
lea ecx, [ebp - 0x6124]
call dword [0x511ab0]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x6124]
push edx
xor esi, esi
call fcn.00417260
mov eax, dword [ebp - 0x6124]
add esp, 4
push esi
push esi
push eax
call dword [sym.imp.mfc100u.dll_AfxMessageBox]
lea ecx, [ebp - 0x6124]
mov byte [ebp - 4], 0
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov ecx, dword [ebp - 0x6130]
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ebx, dword [ebp - 0x612c]
call fcn.00422190
push str.Launcher_Patch_Failed_
call fcn.00417260
add esp, 4
lea ecx, [ebp - 0x6120]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
xor eax, eax
jmp 0x41346b
lea ebx, [esi + 4]
push 0x5441e4
push ebx
call edi
add esp, 8
test eax, eax
jne 0x413666
lea ecx, [ebp - 0x6124]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov dword [ebp - 4], 3
test byte [0x56c888], 1
jne 0x4135d2
or dword [0x56c888], 1
call fcn.0040bb80
push 0x5107b0
call fcn.0050c11f
add esp, 4
mov edi, dword [0x56c860]
lea ecx, [ebp - 0x6128]
add edi, 0x3fc
push ecx
call fcn.00414580
add esp, 4
mov byte [ebp - 4], 4
mov edx, dword [eax]
push 2
push edx
lea eax, [ebp - 0x6124]
push str._s__d
push eax
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0x10
lea ecx, [ebp - 0x6128]
mov byte [ebp - 4], 3
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x6124]
push ecx
lea ecx, [ebp - 0x6120]
call dword [0x511ab0]
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x6120]
push edx
xor esi, esi
call fcn.00417260
mov eax, dword [ebp - 0x6120]
add esp, 4
push esi
push esi
push eax
call dword [sym.imp.mfc100u.dll_AfxMessageBox]
lea ecx, [ebp - 0x6120]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x6124]
jmp 0x4136d0
test byte [0x56c888], 1
jne 0x413688
or dword [0x56c888], 1
call fcn.0040bb80
push 0x5107b0
call fcn.0050c11f
add esp, 4
mov edi, dword [0x56c860]
lea ecx, [ebp - 0x6120]
add edi, 0x3fa
push ecx
call fcn.00414580
add esp, 4
mov dword [ebp - 4], 6
mov edx, dword [ebp - 0x6120]
push edx
xor esi, esi
call fcn.00417260
mov eax, dword [ebp - 0x6120]
add esp, 4
push esi
push esi
push eax
call dword [sym.imp.mfc100u.dll_AfxMessageBox]
lea ecx, [ebp - 0x6120]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str._s_File_Copy_Failed____d_
call fcn.004172c0
mov ecx, dword [ebp - 0x6130]
mov edx, dword [ecx]
mov eax, dword [edx]
add esp, 0xc
push 1
call eax
mov ebx, dword [ebp - 0x612c]
call fcn.00422190
xor eax, eax
jmp 0x41346b
mov ecx, dword [ebx + 0x50]
sub ecx, dword [ebx + 0x4c]
xor esi, esi
test ecx, 0xfffffffc
jle 0x41376b
jmp 0x413726
mov ebx, edi
mov edx, dword [ebx + 0x4c]
mov ebx, dword [edx + esi*4]
call fcn.00422190
mov edi, dword [ebp - 0x6134]
mov eax, dword [edi + 0x4c]
cmp dword [eax + esi*4], 0
lea eax, [eax + esi*4]
je 0x41375d
mov eax, dword [eax]
test eax, eax
je 0x413753
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [edi + 0x4c]
mov dword [ecx + esi*4], 0
mov edx, dword [edi + 0x50]
sub edx, dword [edi + 0x4c]
inc esi
sar edx, 2
cmp esi, edx
jl 0x413724
mov ebx, dword [ebp - 0x612c]
call fcn.00422190
mov eax, 4
jmp 0x41346b