Function at 0x51e66d37
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x51e8c344]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebx]
push edi
push dword [eax]
call fcn.51e1637c
pop ecx
mov dword [ebp - 4], eax
call fcn.51e16d81
mov edi, dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov dword [ebp - 0x10], eax
mov eax, dword [0x51e8b69c]
test eax, eax
mov dword [ebp - 0xc], esi
jne 0x51e66dad
call edi
cmp ax, 0x411
je 0x51e66d8f
call edi
cmp ax, 0x404
je 0x51e66d8f
call edi
cmp ax, 0x412
je 0x51e66d8f
call edi
cmp ax, 0x804
jne 0x51e66db6
mov eax, dword [0x51e8b69c]
test eax, eax
jne 0x51e66e86
call edi
sub ax, 0x404
neg ax
sbb eax, eax
inc eax
jmp 0x51e66e97
cmp dword [eax + 0x53b8], 0
jne 0x51e66d8f
mov eax, dword [0x51e8c348]
cmp dword [eax + 0x15c], 0
je 0x51e66e02
cmp dword [0x51e8c26c], 0
je 0x51e66dd4
mov byte [eax + 0x152], 0x63
push 0x1001
push dword [ebp + 0xc]
push ebx
push dword [ebp - 4]
call fcn.51e6a238
add esp, 0x10
jmp 0x51e670b6
mov eax, dword [ebp - 4]
dec esi
xor edi, edi
mov di, word [eax + esi*2]
push edi
call fcn.51e663d2
test eax, eax
pop ecx
jne 0x51e66e08
test esi, esi
jne 0x51e66ded
jmp 0x51e66e22
cmp di, 0xa
jne 0x51e66e21
mov eax, dword [ebp - 0xc]
dec eax
cmp esi, eax
jne 0x51e66e21
push esi
call fcn.51e66495
pop ecx
mov esi, eax
jmp 0x51e66e22
inc esi
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
test eax, eax
mov dword [ebx], esi
jne 0x51e66e31
xor ecx, ecx
jmp 0x51e66e34
lea ecx, [eax - 1]
cmp esi, ecx
ja 0x51e66e43
test eax, eax
jne 0x51e66e40
xor esi, esi
jmp 0x51e66e43
lea esi, [eax - 1]
mov ebx, esi
jmp 0x51e66e5c
mov eax, dword [ebp - 4]
xor edi, edi
mov di, word [eax + esi*2]
push edi
call fcn.51e663d2
test eax, eax
pop ecx
jne 0x51e66e63
inc esi
cmp esi, dword [ebp - 0x10]
jb 0x51e66e47
jmp 0x51e66e7c
cmp di, 0xa
je 0x51e66e6f
cmp di, 0xd
jne 0x51e66e7c
cmp esi, ebx
jne 0x51e66e7c
push esi
call fcn.51e66695
pop ecx
mov esi, eax
mov eax, dword [ebp + 0xc]
mov dword [eax], esi
jmp 0x51e670b6
xor ecx, ecx
cmp dword [eax + 0x53a8], 0x404
sete cl
mov eax, ecx
test eax, eax
mov eax, dword [0x51e8a120]
jne 0x51e66ebb
test eax, eax
je 0x51e66edc
mov eax, dword [eax + 0x58]
test eax, eax
je 0x51e66edc
mov ecx, dword [ebp - 4]
lea ecx, [ecx + esi*2]
push ecx
call eax
mov ebx, eax
mov dword [ebp - 8], ebx
jmp 0x51e66edf
test eax, eax
je 0x51e66edc
mov eax, dword [eax + 0x58]
test eax, eax
je 0x51e66edc
mov ecx, dword [ebp - 4]
lea ecx, [ecx + esi*2]
push ecx
call eax
push eax
call fcn.51e663ad
add esp, 4
mov ebx, eax
jmp 0x51e66edf
mov ebx, dword [ebp + 8]
test esi, esi
je 0x51e66fba
mov eax, dword [ebp - 4]
lea edi, [eax + esi*2]
dec esi
dec edi
dec edi
mov ax, word [edi]
mov word [ebp - 0x14], ax
mov eax, dword [0x51e8a120]
test eax, eax
mov dword [ebp - 8], ebx
je 0x51e66f0f
mov eax, dword [eax + 0x58]
test eax, eax
je 0x51e66f0f
push edi
call eax
mov ebx, eax
mov eax, dword [0x51e8b69c]
test eax, eax
jne 0x51e66f2a
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
sub ax, 0x404
neg ax
sbb eax, eax
inc eax
jmp 0x51e66f3b
xor ecx, ecx
cmp dword [eax + 0x53a8], 0x404
sete cl
mov eax, ecx
test eax, eax
je 0x51e66f4a
push ebx
call fcn.51e663ad
add esp, 4
mov ebx, eax
mov eax, dword [0x51e8b69c]
test eax, eax
jne 0x51e66f65
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
sub ax, 0x412
neg ax
sbb eax, eax
inc eax
jmp 0x51e66f76
xor ecx, ecx
cmp dword [eax + 0x53a8], 0x412
sete cl
mov eax, ecx
test eax, eax
je 0x51e66f90
push dword [ebp - 8]
call fcn.51e66417
push ebx
mov dl, al
call fcn.51e66417
cmp dl, al
pop ecx
pop ecx
jne 0x51e66f9f
test dword [ebp - 8], ebx
je 0x51e66f9f
test esi, esi
jne 0x51e66eed
jmp 0x51e66fba
cmp word [ebp - 0x14], 0xa
jne 0x51e66fb9
mov eax, dword [ebp - 0xc]
dec eax
cmp esi, eax
jne 0x51e66fb9
push esi
call fcn.51e66495
pop ecx
mov esi, eax
jmp 0x51e66fba
inc esi
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0xc]
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
cmp edi, eax
ja 0x51e66fcd
mov edi, eax
cmp edi, dword [ebp - 0x10]
mov ebx, dword [ebp - 8]
mov dword [ebp - 0xc], edi
jae 0x51e670b1
mov eax, dword [ebp - 4]
lea esi, [eax + edi*2]
mov ax, word [esi]
mov word [ebp - 0x14], ax
mov eax, dword [0x51e8a120]
test eax, eax
mov dword [ebp - 8], ebx
je 0x51e67001
mov eax, dword [eax + 0x58]
test eax, eax
je 0x51e67001
push esi
call eax
mov ebx, eax
mov eax, dword [0x51e8b69c]
test eax, eax
jne 0x51e6701c
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
sub ax, 0x404
neg ax
sbb eax, eax
inc eax
jmp 0x51e6702d
xor ecx, ecx
cmp dword [eax + 0x53a8], 0x404
sete cl
mov eax, ecx
test eax, eax
jne 0x51e6703c
push ebx
call fcn.51e663ad
add esp, 4
mov ebx, eax
mov eax, dword [0x51e8b69c]
test eax, eax
jne 0x51e67057
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
sub ax, 0x412
neg ax
sbb eax, eax
inc eax
jmp 0x51e67068
xor ecx, ecx
cmp dword [eax + 0x53a8], 0x412
sete cl
mov eax, ecx
test eax, eax
je 0x51e67082
push dword [ebp - 8]
call fcn.51e66417
push ebx
mov dl, al
call fcn.51e66417
cmp dl, al
pop ecx
pop ecx
jne 0x51e67095
test dword [ebp - 8], ebx
je 0x51e67095
inc edi
inc esi
inc esi
cmp edi, dword [ebp - 0x10]
jb 0x51e66fe2
jmp 0x51e670b1
cmp word [ebp - 0x14], 0xa
je 0x51e670a3
cmp word [ebp - 0x14], 0xd
jne 0x51e670b1
cmp edi, dword [ebp - 0xc]
jne 0x51e670b1
push edi
call fcn.51e66695
pop ecx
mov edi, eax
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
pop edi
pop esi
pop ebx
leave
ret