Function at 0x51e62f81
Capabilities:
Identify system language via api

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov ecx, dword [esi + 0x24]
mov eax, 0x401
xor edx, edx
inc edx
and ecx, eax
cmp ecx, eax
mov dword [esp + 4], edx
jne 0x51e62fa3
xor eax, eax
jmp 0x51e63366
push ebx
push ebp
push edi
mov edi, dword [esi + 0x18]
mov ecx, dword [esi + 0x20]
xor ebx, ebx
cmp edi, ebx
jne 0x51e62fbf
mov edi, dword [esi]
cmp edi, ecx
jne 0x51e62fde
xor eax, eax
jmp 0x51e63363
cmp edi, ecx
jae 0x51e62fb8
mov al, byte [esi + 0x30]
cmp al, 0xa
je 0x51e62fde
cmp al, 0xb
je 0x51e62fde
test al, al
je 0x51e62fde
mov eax, dword [esi + 8]
add dword [esi + 0x28], eax
mov eax, dword [esi + 0x10]
add dword [esi + 0x2c], eax
cmp edi, ecx
jae 0x51e62fec
cmp word [edi], 0x22
je 0x51e63216
mov eax, dword [esi + 0x24]
xor ebp, ebp
test ah, 4
je 0x51e62ffc
mov byte [esi + 0x30], 0xe0
jmp 0x51e63000
mov byte [esi + 0x30], 0xf2
cmp edi, ecx
mov dword [esi + 0x18], edi
mov dword [esi + 4], edi
mov dword [esi], edi
jae 0x51e63012
lea ecx, [edi + 2]
mov dword [esi + 0x18], ecx
test al, 0x40
mov dword [esi + 0xc], edx
mov dword [esi + 8], edx
mov dword [esi + 0x14], edx
mov dword [esi + 0x10], edx
je 0x51e6309d
mov ax, word [edi]
cmp ax, 0x3a
jne 0x51e6307a
mov ebp, 0x51e85270
mov eax, ebp
sub eax, 0x51e85254
sar eax, 1
mov dword [esp + 0x18], eax
mov eax, dword [0x51e8b69c]
cmp eax, ebx
jne 0x51e630d9
mov ebx, dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
call ebx
cmp ax, 0x411
je 0x51e630e1
call ebx
cmp ax, 0x404
je 0x51e630e1
call ebx
cmp ax, 0x412
je 0x51e630e1
call ebx
cmp ax, 0x804
jne 0x51e6311c
jmp 0x51e630e1
cmp ax, 0x2f
jne 0x51e63087
mov ebp, 0x51e85272
jmp 0x51e63030
push 0x12
push eax
push 0x51e85254
call fcn.51e5b71f
mov ebp, eax
add esp, 0xc
cmp ebp, ebx
jne 0x51e63030
mov ax, word [edi]
cmp ax, 0x3b
jne 0x51e630ad
mov ebp, 0x51df8d06
jmp 0x51e630cd
test byte [esi + 0x24], 0x80
je 0x51e6303d
push 0x12
push eax
push 0x51df8ce4
call fcn.51e5b71f
mov ebp, eax
add esp, 0xc
cmp ebp, ebx
je 0x51e6303d
mov eax, ebp
sub eax, 0x51df8ce4
jmp 0x51e63037
cmp dword [eax + 0x53b8], ebx
je 0x51e6311c
xor eax, eax
cmp ebp, eax
jne 0x51e6311c
cmp dword [0x51eb74e4], eax
mov di, word [edi]
je 0x51e6311c
mov ecx, dword [0x51eb74e4]
add ecx, 0xffffffdf
cmp ecx, eax
jle 0x51e6311c
mov edx, dword [0x51eb74e0]
cmp di, word [edx + eax*2]
je 0x51e63112
inc eax
cmp eax, ecx
jl 0x51e63105
jmp 0x51e6311c
lea ebp, [edx + eax*2]
add eax, 0x21
mov dword [esp + 0x18], eax
and byte [esi + 0x25], 0xf7
test ebp, ebp
je 0x51e63345
mov bl, byte [esp + 0x18]
mov ebp, dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov al, bl
mov byte [esi + 0x30], al
mov eax, dword [0x51e8b69c]
xor edi, edi
cmp eax, edi
jne 0x51e63164
call ebp
cmp ax, 0x411
je 0x51e6316c
call ebp
cmp ax, 0x404
je 0x51e6316c
call ebp
cmp ax, 0x412
je 0x51e6316c
call ebp
cmp ax, 0x804
jne 0x51e63195
jmp 0x51e6316c
cmp dword [eax + 0x53b8], edi
je 0x51e63195
mov ecx, dword [esp + 0x18]
cmp cl, 0x21
jb 0x51e63195
movzx eax, cl
cmp eax, dword [0x51eb74e4]
jge 0x51e63195
mov eax, dword [0x51e8a120]
cmp eax, edi
je 0x51e63195
mov eax, dword [eax + 0x4c]
cmp eax, edi
je 0x51e63195
push ecx
call eax
mov bl, al
movzx eax, bl
cmp eax, 0x70
jg 0x51e631f2
je 0x51e631ee
cmp eax, 9
jg 0x51e631b0
je 0x51e631ee
sub eax, edi
jne 0x51e631df
test byte [esi + 0x24], 8
jmp 0x51e631d1
sub eax, 0xa
je 0x51e631c3
dec eax
jne 0x51e63205
mov eax, dword [esi + 0x24]
and eax, 0xffffffef
or eax, 0x20
jmp 0x51e631cc
mov eax, dword [esi + 0x24]
and eax, 0xffffffdf
or eax, 0x10
mov dword [esi + 0x24], eax
test al, 2
je 0x51e63345
xor edx, edx
inc edx
jmp 0x51e62fa6
dec eax
je 0x51e631ee
dec eax
dec eax
je 0x51e631ee
dec eax
dec eax
je 0x51e631ee
dec eax
dec eax
jne 0x51e631f2
or byte [esi + 0x25], 8
test byte [esi + 0x25], 4
je 0x51e632bc
mov byte [esi + 0x30], 0xe0
jmp 0x51e63345
sub eax, 5
je 0x51e63288
dec eax
jne 0x51e631f2
or byte [esi + 0x25], 4
jmp 0x51e63345
mov eax, dword [esi + 0x20]
mov dword [esi + 4], edi
inc edi
inc edi
sub eax, edi
sar eax, 1
push eax
push 0x22
push edi
mov byte [esi + 0x30], 0xf0
mov dword [esi], edi
call fcn.51e5b71f
add esp, 0xc
cmp eax, ebx
jne 0x51e6323b
mov eax, dword [esi + 0x20]
mov ecx, dword [esi]
mov edx, eax
sub edx, ecx
sar edx, 1
cmp ecx, eax
mov dword [esi + 8], edx
mov dword [esi + 0x10], ebx
jae 0x51e63258
mov edx, eax
sub edx, ecx
dec edx
shr edx, 1
inc edx
mov dword [esi + 0x10], edx
mov edx, dword [esi + 4]
mov ecx, eax
sub ecx, edx
sar ecx, 1
cmp edx, eax
mov dword [esi + 0xc], ecx
mov dword [esi + 0x14], ebx
jae 0x51e63276
mov edi, eax
sub edi, edx
dec edi
shr edi, 1
inc edi
mov dword [esi + 0x14], edi
cmp eax, dword [esi + 0x20]
mov dword [esi + 0x18], eax
jae 0x51e63345
inc ecx
inc dword [esi + 0x14]
jmp 0x51e632a5
mov eax, dword [esi + 0x18]
cmp eax, dword [esi + 0x20]
jae 0x51e632b3
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
shl ecx, 1
add dword [esi], ecx
xor ecx, ecx
inc ecx
shl edx, 1
add dword [esi + 4], edx
mov dword [esi + 8], ecx
add eax, 2
mov dword [esi + 0xc], ecx
mov dword [esi + 0x18], eax
jmp 0x51e63345
mov dword [esp + 0x10], edi
jmp 0x51e63345
mov eax, dword [0x51e8b69c]
test eax, eax
lea edi, [esi + 0x32]
mov dword [esi], edi
jne 0x51e63300
call ebp
cmp ax, 0x411
je 0x51e63309
call ebp
cmp ax, 0x404
je 0x51e63309
call ebp
cmp ax, 0x412
je 0x51e63309
call ebp
cmp ax, 0x804
je 0x51e63309
mov eax, dword [esi + 0x24]
test ah, 1
je 0x51e63327
mov eax, dword [esp + 0x18]
mov ax, word [eax*2 + 0x51df8ce4]
jmp 0x51e63342
cmp dword [eax + 0x53b8], 0
je 0x51e632ea
mov eax, dword [esp + 0x18]
cmp eax, 0x21
jl 0x51e632ea
cmp eax, dword [0x51eb74e4]
jge 0x51e632ea
mov ecx, dword [0x51eb74e0]
mov ax, word [ecx + eax*2 - 0x42]
jmp 0x51e63342
test ah, 2
mov eax, dword [esp + 0x18]
je 0x51e6333a
mov ax, word [eax*2 + 0x51e6336c]
jmp 0x51e63342
mov ax, word [eax*2 + 0x51e85254]
mov word [edi], ax
cmp byte [esi + 0x30], 0x11
jne 0x51e6335f
mov eax, dword [esi + 0x24]
test al, 1
je 0x51e6335f
or eax, 0x400
mov dword [esi + 0x24], eax
jmp 0x51e62fb8
mov eax, dword [esp + 0x10]
pop edi
pop ebp
pop ebx
pop esi
pop ecx
ret