Function at 0x413840
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x43f004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov dword [ebp - 0x210], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultUILanguage]
push dword [0x441c90]
movzx eax, ax
mov dword [ebp - 0x224], eax
call dword [sym.imp.USER32.dll_GetMenu]
mov ebx, dword [sym.imp.USER32.dll_GetSubMenu]
mov edi, eax
push 0
push edi
call ebx
push 0x43be2c
push 0xa001
mov esi, eax
push 0
push esi
call dword [sym.imp.USER32.dll_AppendMenuW]
push str.USB_Device_Only
push 0xa006
push 0
push esi
call dword [sym.imp.USER32.dll_AppendMenuW]
push str.Generate_VTSI_File
push 0xa007
push 0
push esi
call dword [sym.imp.USER32.dll_AppendMenuW]
push 0x43be2c
push 0xa002
push 0
push esi
call dword [sym.imp.USER32.dll_AppendMenuW]
push 0x43be2c
push 0xa008
push 0
push esi
call dword [sym.imp.USER32.dll_AppendMenuW]
cmp dword [0x440404], 0
mov esi, dword [sym.imp.USER32.dll_CheckMenuItem]
je 0x413906
push 0
push 0x9c4c
push edi
call esi
push 8
jmp 0x413912
push 8
push 0x9c4c
push edi
call esi
push 0
push 0x9c4d
push edi
call esi
push 1
push edi
call ebx
push 0x400
push 0
push eax
mov dword [ebp - 0x228], eax
call dword [sym.imp.USER32.dll_DeleteMenu]
push 0x14e6320
call fcn.0041d7a6
add esp, 4
mov dword [0x44040c], eax
test eax, eax
je 0x413baf
push 0x14e6320
push 0
push eax
call fcn.0041a3d0
add esp, 0xc
push str.._ventoylanguages.json
push 0
call fcn.004100f0
add esp, 8
test eax, eax
je 0x413984
push str.Load_languages_from_json_file_...
call fcn.0040ffe0
add esp, 4
call fcn.004134a0
jmp 0x413996
push str.Load_languages_from_ini_file_...
call fcn.0040ffe0
add esp, 4
call fcn.00413200
mov eax, dword [0x4403fc]
mov edi, dword [0x44040c]
push 0x1ac04
mov dword [ebp - 0x218], eax
call fcn.0041d7a6
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpW]
add esp, 4
mov dword [ebp - 0x20c], eax
test eax, eax
je 0x413aab
mov edx, dword [ebp - 0x218]
test edx, edx
jle 0x413aa2
mov ecx, 1
mov dword [ebp - 0x220], edx
mov dword [ebp - 0x21c], ecx
mov eax, edx
nop dword [eax]
cmp ecx, edx
jge 0x413a80
mov eax, edx
lea esi, [edi + 0x1ac04]
sub eax, ecx
mov dword [ebp - 0x214], eax
push str.Chinese_Simplified__
push esi
call ebx
test eax, eax
je 0x413a28
push str.Chinese_Simplified__
push edi
call ebx
test eax, eax
je 0x413a5f
push edi
push esi
call ebx
test eax, eax
jns 0x413a5f
push 0x1ac04
push edi
push dword [ebp - 0x20c]
call fcn.0041aa80
add esp, 0xc
push 0x1ac04
push esi
push edi
call fcn.0041aa80
add esp, 0xc
push 0x1ac04
push dword [ebp - 0x20c]
push esi
call fcn.0041aa80
add esp, 0xc
add esi, 0x1ac04
sub dword [ebp - 0x214], 1
jne 0x413a08
mov ecx, dword [ebp - 0x21c]
mov edx, dword [ebp - 0x218]
mov eax, dword [ebp - 0x220]
inc ecx
add edi, 0x1ac04
sub eax, 1
mov dword [ebp - 0x21c], ecx
mov dword [ebp - 0x220], eax
jne 0x4139f0
mov eax, dword [ebp - 0x20c]
push eax
call fcn.0041d78b
add esp, 4
xor eax, eax
mov ecx, 0x804
cmp cx, word [ebp - 0x224]
mov edi, 0xffffffff
push 0x200
cmove edi, eax
push eax
lea eax, [ebp - 0x208]
mov dword [ebp - 0x20c], edi
push eax
call fcn.0041a3d0
add esp, 0xc
lea eax, [ebp - 0x208]
push 0x43bb58
push 0x100
push eax
push 0x43bd68
push 0x43bec4
push 0x4382fc
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor esi, esi
cmp dword [0x4403fc], esi
jle 0x413b9d
xor edi, edi
mov eax, dword [0x44040c]
add eax, edi
push eax
mov eax, esi
or eax, 0xb000
push eax
push 0
push dword [ebp - 0x228]
call dword [sym.imp.USER32.dll_AppendMenuW]
cmp dword [ebp - 0x210], 0
jge 0x413b5b
lea eax, [ebp - 0x208]
push eax
mov eax, dword [0x44040c]
add eax, edi
push eax
call ebx
mov ecx, dword [ebp - 0x210]
test eax, eax
cmove ecx, esi
mov dword [ebp - 0x210], ecx
cmp dword [ebp - 0x20c], 0
jge 0x413b84
mov eax, dword [0x44040c]
push str.English__English_
add eax, edi
push eax
call ebx
mov ecx, dword [ebp - 0x20c]
test eax, eax
cmove ecx, esi
mov dword [ebp - 0x20c], ecx
inc esi
add edi, 0x1ac04
cmp esi, dword [0x4403fc]
jl 0x413b12
mov edi, dword [ebp - 0x20c]
mov eax, dword [ebp - 0x210]
test eax, eax
cmovns edi, eax
mov ecx, edi
call fcn.00412e90
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00418e9d
mov esp, ebp
pop ebp
ret