Function at 0x40a983
Capabilities:
Copy file
Enumerate gui resources
Get common file path
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc64
mov eax, dword [0x446b0c]
xor eax, esp
mov dword [esp + 0xc60], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push ebx
push 0x40a864
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], eax
call dword [sym.imp.USER32.dll_EnumWindows]
cmp dword [0x44b420], ebx
je 0x40a9cb
xor eax, eax
jmp 0x40adb2
mov dword [esp + 0x54], ebx
call fcn.0040a8bd
mov esi, 0x7f00
push esi
push ebx
mov dword [0x44b3b4], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x50], 0x440790
mov dword [esp + 0x30], 0x4095c5
mov dword [esp + 0x2c], 3
call dword [sym.imp.USER32.dll_LoadIconW]
push esi
push ebx
mov dword [esp + 0x40], eax
call dword [sym.imp.USER32.dll_LoadCursorW]
push ebx
mov dword [esp + 0x40], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x48], str.LOOKALF
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call dword [sym.imp.USER32.dll_RegisterClassW]
test ax, ax
je 0x40a9c4
push 0x304
call fcn.00416eea
mov esi, eax
cmp esi, ebx
pop ecx
je 0x40aa7a
push 0x440814
push 0x4400f0
push esi
call fcn.004202fd
add esp, 0xc
push str.Test_messages_n
push dword [esi]
call fcn.0042053a
push dword [esi]
call fcn.0042082a
add esp, 0xc
jmp 0x40aa7c
xor esi, esi
push 0x50a0
mov dword [0x44b428], esi
call fcn.00416eea
mov esi, eax
cmp esi, ebx
pop ecx
je 0x40aaa6
push dword [esp + 0xc]
call fcn.00420000
pop ecx
mov ecx, edi
call fcn.0040ae2f
jmp 0x40aaa8
xor eax, eax
lea esi, [eax + 0x40]
lea edi, [esp + 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [0x44b3c0], eax
movsd dword es:[edi], dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [esp + 0x68]
push eax
mov esi, 0x1ff
push esi
call edi
push str.LangRsRuReleaseLangRsRu.dll
lea eax, [esp + 0x6c]
push esi
push eax
call fcn.004218ae
add esp, 0xc
lea eax, [esp + 0x468]
push eax
push esi
call edi
push str.ReleaseLangDLLsLangRsRu.dll
lea eax, [esp + 0x46c]
push esi
push eax
call fcn.004218ae
lea eax, [esp + 0x74]
add esp, 0xc
push eax
call fcn.00414755
test eax, eax
pop ecx
je 0x40ab22
push ebx
lea eax, [esp + 0x46c]
push eax
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [esp + 0x68]
push eax
push esi
call edi
push str.LangRsEnReleaseLangRsEn.dll
lea eax, [esp + 0x6c]
push esi
push eax
call fcn.004218ae
add esp, 0xc
lea eax, [esp + 0x468]
push eax
push esi
call edi
push str.ReleaseLangDLLsLangRsEn.dll
lea eax, [esp + 0x46c]
push esi
push eax
call fcn.004218ae
lea eax, [esp + 0x74]
add esp, 0xc
push eax
call fcn.00414755
test eax, eax
pop ecx
je 0x40ab81
push ebx
lea eax, [esp + 0x46c]
push eax
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov word [0x44b3a0], ax
movzx eax, ax
push eax
push str._int_langUI
call fcn.0040109f
cmp byte [0x44b3a0], 0x19
jne 0x40abab
push str.russian
jmp 0x40abb0
push str.nonrussian
call fcn.0040106a
push esi
lea eax, [esp + 0x86c]
push eax
push dword [0x44b3b4]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x868]
push 0x5c
push eax
call fcn.00420e23
cmp eax, ebx
pop ecx
pop ecx
je 0x40abe2
mov word [eax], bx
cmp byte [0x44b3a0], 0x19
mov eax, str.LangDLLsLangRsRu.dll
je 0x40abf5
mov eax, str.LangDLLsLangRsEn.dll
push eax
lea eax, [esp + 0x86c]
push 0x200
push eax
call fcn.004218ae
add esp, 0xc
push 2
push ebx
lea eax, [esp + 0x870]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
cmp eax, ebx
mov dword [0x44b3b0], eax
jne 0x40ac31
push str.DLL_load_ERROR
call fcn.00401000
jmp 0x40ac3b
push str.DLL_load_OK
call fcn.0040106a
push str.LOOKALF
push dword [0x44b3b0]
call dword [sym.imp.USER32.dll_LoadMenuW]
cmp eax, ebx
mov dword [0x44b39c], eax
jne 0x40ac61
push str.Menu_load_ERROR
call fcn.00401000
jmp 0x40ac6b
push str.Menu_load_OK
call fcn.0040106a
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x18]
push ebx
push dword [esp + 0x14]
push dword [0x44b39c]
push ebx
push eax
mov eax, dword [esp + 0x30]
sub eax, dword [esp + 0x28]
push eax
push dword [esp + 0x30]
mov eax, 0x440790
push dword [esp + 0x30]
push 0xcf0000
push eax
push eax
push ebx
call dword [sym.imp.USER32.dll_CreateWindowExW]
push 0xca
mov dword [0x44b424], eax
call fcn.0041482f
pop ecx
push eax
push dword [0x44b424]
call dword [sym.imp.USER32.dll_SetWindowTextW]
cmp dword [0x44b3b0], ebx
jne 0x40ace4
push 0x1010
push str.Error
push str.Language_Resource_DLL_not_found_in_current_dir
push dword [0x44b424]
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [esp + 0xc]
call fcn.00414808
pop ecx
mov esi, eax
push esi
call fcn.00401000
cmp esi, ebx
je 0x40ad2d
cmp word [esi], 0x22
jne 0x40ad2d
add esi, 2
push 0x22
push esi
call fcn.00420e23
cmp eax, ebx
pop ecx
pop ecx
je 0x40ad2d
fld qword [0x441740]
push ecx
push ecx
fstp qword [esp]
push 0xffffffffffffffff
push esi
mov esi, dword [0x44b3c0]
mov word [eax], bx
call fcn.0040b020
push dword [0x44b424]
call dword [sym.imp.USER32.dll_GetMenu]
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
mov dword [0x44b398], eax
jmp 0x40ad5c
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push ebx
push ebx
push ebx
lea eax, [esp + 0x58]
push eax
call esi
test eax, eax
jne 0x40ad46
mov eax, dword [0x44b39c]
cmp eax, ebx
je 0x40ad7a
push eax
call dword [sym.imp.USER32.dll_DestroyMenu]
mov ecx, dword [0x44b3c0]
cmp ecx, ebx
mov esi, ecx
je 0x40ad92
call fcn.0040c7e1
push esi
call fcn.00416f15
pop ecx
mov eax, dword [0x44b3b0]
cmp eax, ebx
je 0x40ada2
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push dword [0x44b428]
call fcn.00416f15
mov eax, dword [esp + 0x58]
pop ecx
mov ecx, dword [esp + 0xc6c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041fba2
mov esp, ebp
pop ebp
ret 0x10