Function at 0x406ad0
Capabilities:
Copy file
Get common file path
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4247e2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x12c
push esi
push edi
push str.GDI32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
mov dword [esp + 0x14], edi
je 0x406df2
push str.EnableEUDC
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
mov dword [esp + 0x24], esi
jne 0x406b3d
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [esp + 0x134]
mov dword fs:[0], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0
call esi
push str.EUDC936
lea ecx, [esp + 0x1c]
call fcn.00402560
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
push 0xf003f
push 0
push ecx
push 0x80000001
mov dword [esp + 0x150], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406dbe
push str.SystemDefaultEUDCFont
lea ecx, [esp + 0x24]
call fcn.00402560
mov byte [esp + 0x28], 0
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x29]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea edx, [esp + 0x2c]
push edx
mov byte [esp + 0x144], 1
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0xc]
call fcn.00402560
push 0x426504
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x18]
push edx
mov byte [esp + 0x148], 2
call fcn.004053f0
mov esi, dword [ebp + 0xc]
push esi
push eax
lea eax, [esp + 0x20]
push eax
mov byte [esp + 0x154], 3
call fcn.004053f0
add esp, 0x18
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x140], 4
call fcn.004016b0
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov byte [esp + 0x13c], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c35
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x13c], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c5b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push str..tte
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.004053f0
add esp, 0xc
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x140], 5
call fcn.004016b0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x13c], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406caa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 8]
cmp dword [eax - 4], 1
mov edi, dword [eax - 0xc]
jle 0x406cc7
mov eax, edi
push eax
lea ecx, [esp + 0xc]
call fcn.00401270
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
push edi
push eax
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
je 0x406cf7
push 0
push str.reg_tte_error
push str.cant_write_reg
push 0
call edi
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 8]
push esi
push ecx
lea edx, [esp + 0x30]
push str._s_s.tte
push edx
call fcn.0040f926
mov eax, dword [esp + 0x18]
add esp, 0x10
push 0
push eax
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x406d6a
push eax
push eax
lea edx, [esp + 0x14]
push edx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [esp + 0xc]
push 0x40
push str.Error
push eax
push 0
call edi
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 8]
add eax, 0xfffffff0
mov byte [esp + 0x13c], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406d90
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x13c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406db6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x24]
push 1
call esi
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x13c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406df2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x134]
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
ret