Function at 0x51e65ada
Capabilities:
Identify system language via api

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push 1
call fcn.51e11c55
lea ebx, [eax + eax]
pop ecx
mov dword [esp + 0x10], eax
lea eax, [ebx + 2]
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
xor ebp, ebp
cmp esi, ebp
mov dword [esp + 0xc], esi
je 0x51e65b1f
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edx, eax
cmp edx, ebp
mov dword [esp + 0x14], edx
jne 0x51e65b31
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0x7d4
call fcn.51e17998
pop ecx
xor eax, eax
jmp 0x51e65cd0
mov eax, dword [0x51e8c344]
mov eax, dword [eax]
mov eax, dword [eax]
mov esi, dword [0x51e8c348]
mov esi, dword [esi + 0x58]
imul esi, dword [eax + 8]
lea esi, [esi + eax + 0x18]
mov ecx, ebx
mov eax, ecx
shr ecx, 2
push edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [0x51e8b69c]
and ecx, 3
cmp eax, ebp
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov word [ebx + edx], bp
jne 0x51e65b83
call esi
mov edx, dword [esp + 0x18]
sub ax, 0x411
neg ax
sbb eax, eax
inc eax
jmp 0x51e65b94
xor ecx, ecx
cmp dword [eax + 0x53a8], 0x411
sete cl
mov eax, ecx
cmp eax, ebp
je 0x51e65bb7
mov eax, dword [esp + 0x14]
cmp eax, 0x100
jae 0x51e65bb7
inc eax
push eax
push 0x51eb7700
push edx
call fcn.51e00420
push 1
call fcn.51e653f1
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp dword [esp + 0x24], ebp
jne 0x51e65ccb
call fcn.51e654bf
push dword [esp + 0x10]
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
mov eax, dword [0x51e8b69c]
cmp eax, ebp
jne 0x51e65c42
call esi
cmp ax, 0x411
je 0x51e65c4a
call esi
cmp ax, 0x404
je 0x51e65c4a
call esi
cmp ax, 0x412
je 0x51e65c4a
call esi
cmp ax, 0x804
je 0x51e65c4a
push ebp
push ebp
push ebp
push ebp
push 0xffffffffffffffff
push ebx
push ebp
push dword [esp + 0x34]
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
call esi
mov edi, eax
push edi
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, ebp
mov dword [esp + 0x1c], eax
jne 0x51e65c55
push 0x7d4
call fcn.51e17998
pop ecx
xor eax, eax
jmp 0x51e65ccf
cmp dword [eax + 0x53b8], ebp
je 0x51e65c09
push ebp
push ebp
push ebp
push ebp
push 0xffffffffffffffff
push ebx
push ebp
push ebp
jmp 0x51e65c15
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [esp + 0x14], eax
mov eax, dword [0x51e8b69c]
cmp eax, ebp
jne 0x51e65cd7
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
cmp ax, 0x411
je 0x51e65cdf
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
cmp ax, 0x404
je 0x51e65cdf
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
cmp ax, 0x412
je 0x51e65cdf
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
cmp ax, 0x804
je 0x51e65cdf
push ebp
push ebp
push edi
push dword [esp + 0x20]
push 0xffffffffffffffff
push ebx
push ebp
push dword [esp + 0x34]
call esi
push dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call esi
mov edi, dword [esp + 0x1c]
push edi
call esi
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
cmp dword [eax + 0x53b8], ebp
je 0x51e65c99
push ebp
push ebp
push edi
push dword [esp + 0x20]
push 0xffffffffffffffff
push ebx
push ebp
push ebp
jmp 0x51e65ca8