Function at 0x40c140
Capabilities:
Copy file
Enumerate gui resources
Get common file path
Identify system language via api
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0xc74
mov eax, dword [0x449ad4]
xor eax, esp
mov dword [esp + 0xc70], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push ebx
push 0x40c000
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], eax
call dword [sym.imp.USER32.dll_EnumWindows]
cmp dword [0x44e41c], ebx
je 0x40c19a
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc70]
xor ecx, esp
call fcn.004237b7
mov esp, ebp
pop ebp
ret 0x10
mov dword [esp + 0x64], ebx
call fcn.0040c070
push 0x7f00
push ebx
mov dword [0x44e3b0], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x60], 0x441614
mov dword [esp + 0x40], 0x40aa50
mov dword [esp + 0x3c], 3
call dword [sym.imp.USER32.dll_LoadIconW]
push 0x7f00
push ebx
mov dword [esp + 0x50], eax
call dword [sym.imp.USER32.dll_LoadCursorW]
push ebx
mov dword [esp + 0x50], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
lea ecx, [esp + 0x34]
push ecx
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], str.LOOKALF
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
call dword [sym.imp.USER32.dll_RegisterClassW]
test ax, ax
je 0x40c181
push 0x304
call fcn.0041aafd
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x40c254
push 0x441698
push 0x440fe4
push esi
call fcn.00423e6f
mov edx, dword [esi]
add esp, 0xc
push str.Test_messages_n
push edx
call fcn.0042402a
mov eax, dword [esi]
push eax
call fcn.00424302
add esp, 0xc
jmp 0x40c256
xor esi, esi
push 0x50a0
mov dword [0x44e424], esi
call fcn.0041aafd
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x40c28c
mov eax, dword [esp + 0x1c]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40c276
sub eax, edx
mov ecx, eax
mov eax, edi
call fcn.0040c750
jmp 0x40c28e
xor eax, eax
mov ecx, dword [eax + 0x40]
mov edx, dword [eax + 0x44]
mov edi, dword [eax + 0x48]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0x78]
mov dword [0x44e3bc], eax
mov eax, dword [eax + 0x4c]
push ecx
push 0x1ff
mov dword [esp + 0x30], edx
mov dword [esp + 0x38], eax
call esi
push str.LangRsRuReleaseLangRsRu.dll
lea edx, [esp + 0x7c]
push 0x1ff
push edx
call fcn.00424fb7
add esp, 0xc
lea eax, [esp + 0x478]
push eax
push 0x1ff
call esi
push str.ReleaseLangDLLsLangRsRu.dll
lea ecx, [esp + 0x47c]
push 0x1ff
push ecx
call fcn.00424fb7
add esp, 0xc
push 0x44154c
lea edx, [esp + 0x7c]
push edx
lea eax, [esp + 0x20]
push eax
call fcn.00424cb5
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileW]
add esp, 0xc
test eax, eax
jne 0x40c33f
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00424302
add esp, 4
push 0
lea edx, [esp + 0x47c]
push edx
lea eax, [esp + 0x80]
push eax
call ebx
lea ecx, [esp + 0x78]
push ecx
push 0x1ff
call esi
push str.LangRsEnReleaseLangRsEn.dll
lea edx, [esp + 0x7c]
push 0x1ff
push edx
call fcn.00424fb7
add esp, 0xc
lea eax, [esp + 0x478]
push eax
push 0x1ff
call esi
push str.ReleaseLangDLLsLangRsEn.dll
lea ecx, [esp + 0x47c]
push 0x1ff
push ecx
call fcn.00424fb7
add esp, 0xc
push 0x44154c
lea edx, [esp + 0x7c]
push edx
lea eax, [esp + 0x20]
push eax
call fcn.00424cb5
add esp, 0xc
test eax, eax
jne 0x40c3c7
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00424302
add esp, 4
push 0
lea edx, [esp + 0x47c]
push edx
lea eax, [esp + 0x80]
push eax
call ebx
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov ebx, dword [0x44e424]
push 0x440ff0
push 0x440fe4
push ebx
mov word [0x44e39c], ax
movzx esi, ax
call fcn.00423e6f
mov ecx, dword [ebx]
add esp, 0xc
push esi
push esi
push str._int_langUI
push str._s_d__x__n
push ecx
call fcn.0042402a
mov edx, dword [ebx]
add esp, 0x14
push edx
call fcn.00424302
mov bl, 0x19
add esp, 4
cmp byte [0x44e39c], bl
jne 0x40c422
push str.russian
jmp 0x40c427
push str.nonrussian
call fcn.00401090
mov ecx, dword [0x44e3b0]
push 0x1ff
lea eax, [esp + 0x87c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x878]
push 0x5c
push edx
call fcn.0042458c
add esp, 8
test eax, eax
je 0x40c461
mov word [eax], 0
cmp byte [0x44e39c], bl
mov eax, str.LangDLLsLangRsRu.dll
je 0x40c473
mov eax, str.LangDLLsLangRsEn.dll
push eax
lea eax, [esp + 0x87c]
push 0x200
push eax
call fcn.00424fb7
add esp, 0xc
push 2
push 0
lea ecx, [esp + 0x880]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
test eax, eax
mov dword [0x44e3ac], eax
jne 0x40c4b0
mov ebx, str.DLL_load_ERROR
call fcn.00401000
jmp 0x40c4ba
push str.DLL_load_OK
call fcn.00401090
mov edx, dword [0x44e3ac]
push str.LOOKALF
push edx
call dword [sym.imp.USER32.dll_LoadMenuW]
test eax, eax
mov dword [0x44e398], eax
jne 0x40c4e1
mov ebx, str.Menu_load_ERROR
call fcn.00401000
jmp 0x40c4eb
push str.Menu_load_OK
call fcn.00401090
mov eax, dword [esp + 0x20]
mov ecx, dword [0x44e398]
push 0
push eax
mov eax, dword [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x34]
push 0
sub eax, ecx
push eax
mov eax, dword [esp + 0x38]
sub edi, eax
push edi
push ecx
push eax
push 0xcf0000
push 0x441614
push 0x441614
push 0
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov ecx, 0xca
mov dword [0x44e420], eax
call fcn.00417d60
mov edx, dword [0x44e420]
push eax
push edx
call dword [sym.imp.USER32.dll_SetWindowTextW]
cmp dword [0x44e3ac], 0
jne 0x40c567
mov eax, dword [0x44e420]
push 0x1010
push str.Error
push str.Language_Resource_DLL_not_found_in_current_dir
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edx, dword [esp + 0x1c]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40c570
sub eax, esi
add eax, 1
push eax
push 0x44f448
push 0xffffffffffffffff
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, 0x44f448
call fcn.00401000
cmp word [0x44f448], 0x22
jne 0x40c5db
push 0x22
push 0x44f44a
call fcn.0042458c
add esp, 8
test eax, eax
je 0x40c5db
fld qword [0x442528]
mov esi, dword [0x44e3bc]
sub esp, 8
fstp qword [esp]
push 0xffffffffffffffff
push 0x44f44a
mov word [eax], 0
call fcn.0040c9a0
mov ecx, dword [0x44e420]
push ecx
call dword [sym.imp.USER32.dll_GetMenu]
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
push 0
push 0
push 0
lea edx, [esp + 0x68]
push edx
mov dword [0x44e394], eax
call esi
test eax, eax
je 0x40c62f
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageW]
lea eax, [esp + 0x5c]
push eax
call edi
lea ecx, [esp + 0x5c]
push ecx
call ebx
push 0
push 0
push 0
lea edx, [esp + 0x68]
push edx
call esi
test eax, eax
jne 0x40c610
mov eax, dword [0x44e398]
test eax, eax
je 0x40c63f
push eax
call dword [sym.imp.USER32.dll_DestroyMenu]
mov eax, dword [0x44e3bc]
test eax, eax
mov esi, eax
je 0x40c659
push eax
call fcn.0040e2e0
push esi
call fcn.0041ab28
add esp, 4
mov eax, dword [0x44e3ac]
test eax, eax
je 0x40c669
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [0x44e424]
push eax
call fcn.0041ab28
mov ecx, dword [esp + 0xc80]
mov eax, dword [esp + 0x68]
add esp, 4
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004237b7
mov esp, ebp
pop ebp
ret 0x10