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

Disassembly:
mov eax, 0x565ef2
call fcn.00524444
mov eax, 0x124c
call fcn.00524e70
lea eax, [ebp - 0x254]
push ebx
xor ebx, ebx
push eax
push 0x208
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x405be3
mov byte [ebp - 0x254], bl
mov eax, dword [0x622cb4]
mov dword [ebp - 4], ebx
cmp eax, ebx
je 0x405bfc
cmp byte [eax], bl
je 0x405bfc
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
jmp 0x405bfe
xor eax, eax
cmp eax, ebx
je 0x405e20
mov eax, dword [ebp + 8]
cmp eax, ebx
jne 0x405c2c
push dword [ebp + 0x10]
lea eax, [ebp - 0x14]
push dword [ebp + 0xc]
push eax
call fcn.0047a9b3
add esp, 0xc
mov dword [ebp - 0x10], 1
mov eax, dword [eax]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp + 8]
call fcn.0053ebbd
test byte [ebp - 0x10], 1
mov dword [ebp - 4], 3
je 0x405c4a
lea ecx, [ebp - 0x14]
call fcn.0053eb4f
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov edi, 0x5bc9e8
mov esi, 0x5bc9e0
mov eax, edi
je 0x405c5f
mov eax, esi
push eax
lea ecx, [ebp + 8]
call fcn.0053ef2b
push dword [ebp + 8]
lea ecx, [ebp - 0x4c]
call fcn.0040207d
push ebx
lea ecx, [ebp - 0x4c]
call fcn.004020bb
test eax, eax
jne 0x405d44
cmp dword [ebp + 0xc], ebx
jne 0x405c8b
mov esi, edi
push dword [ebp + 0x10]
lea ecx, [ebp - 0x10]
call fcn.0053ebbd
push esi
push eax
lea eax, [ebp + 0x10]
mov byte [ebp - 4], 4
push eax
call fcn.0053ede4
push eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 5
call fcn.0053ec88
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 4
call fcn.0053eb4f
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 3
call fcn.0053eb4f
push dword [ebp + 8]
lea ecx, [ebp - 0x4c]
call fcn.0040207d
push ebx
lea ecx, [ebp - 0x4c]
call fcn.004020bb
test eax, eax
jne 0x405d44
lea ecx, [ebp - 0x30]
call fcn.00519a72
cmp dword [ebp + 0xc], ebx
mov byte [ebp - 4], 6
mov eax, 0x5bc9d8
je 0x405cfd
mov eax, 0x5bc9d0
push ebx
push eax
lea ecx, [ebp - 0x30]
call fcn.00519b35
cmp eax, ebx
je 0x405d38
lea ecx, [ebp - 0x30]
call fcn.00519d55
lea eax, [ebp + 0x10]
lea ecx, [ebp - 0x30]
push eax
call fcn.00519e24
push eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 7
call fcn.0053ec88
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 6
call fcn.0053eb4f
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 3
call fcn.00519aaf
push dword [ebp + 8]
lea ecx, [ebp - 0x4c]
call fcn.0040207d
push ebx
lea ecx, [ebp - 0x4c]
call fcn.004020bb
pop edi
pop esi
test eax, eax
je 0x405e15
cmp dword [ebp + 0x14], ebx
je 0x405df8
mov eax, dword [0x61d784]
mov dword [ebp + 0x10], eax
mov byte [ebp - 4], 8
call fcn.0055c7c5
mov ecx, dword [ebp + 0xc]
lea edx, [ebp + 0x10]
dec ecx
push ebx
neg ecx
sbb ecx, ecx
mov eax, dword [eax + 4]
and ecx, edx
lea edx, [ebp + 0x10]
push ecx
mov ecx, dword [ebp + 0xc]
neg ecx
sbb ecx, ecx
and ecx, edx
push ecx
mov ecx, eax
call fcn.00431f6a
push ebx
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x405dec
push dword [ebp + 8]
lea ecx, [ebp - 0x1258]
call fcn.00404989
lea eax, [ebp + 0x14]
lea ecx, [ebp - 0x1258]
push eax
call fcn.00407702
push dword [eax]
mov byte [ebp - 4], 9
push dword [ebp + 0xc]
call fcn.0047a9ed
pop ecx
mov byte [ebp - 4], 8
pop ecx
lea ecx, [ebp + 0x14]
call fcn.0053eb4f
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 3
call fcn.0053eb4f
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call fcn.0053eb4f
lea eax, [ebp - 0x254]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 1
pop eax
jmp 0x405e2f
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call fcn.0053eb4f
lea eax, [ebp - 0x254]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop ebx
mov dword fs:[0], ecx
leave
ret