Function at 0x4054e0
Capabilities:
Identify system language via api

Disassembly:
push 0xffffffffffffffff
push 0x46fc30
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x4871a0]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4871a0]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
push str.languages
lea eax, [esp + 0x38]
push eax
push 0x4903c4
xor ecx, ecx
call fcn.004067a0
lea ecx, [esp + 0x18]
xor ebx, ebx
push ecx
mov dword [esp + 0x6c], ebx
call fcn.00449c80
mov byte [esp + 0x68], 1
mov edx, dword [esp + 0x34]
push edx
mov edx, 0x477e20
lea ecx, [esp + 0x1c]
call fcn.004073c0
mov ecx, dword [esp + 0x2c]
sub ecx, dword [esp + 0x28]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov edi, edx
shr edi, 0x1f
add edi, edx
add esp, 4
mov dword [esp + 0x3c], edi
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov ecx, 0x490400
movzx ebp, ax
call fcn.00405040
mov byte [0x490417], al
xor eax, eax
mov word [esp + 0x44], ax
mov eax, dword [0x490400]
mov ecx, eax
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], ebx
lea edx, [ecx + 2]
mov si, word [ecx]
add ecx, 2
cmp si, bx
jne 0x4055a7
sub ecx, edx
sar ecx, 1
push ecx
lea esi, [esp + 0x44]
call fcn.0040d850
mov byte [esp + 0x68], 2
cmp byte [0x490417], 0
je 0x405689
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
cmp esi, eax
jbe 0x4055eb
call fcn.00450357
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
sub eax, esi
mov ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
xor edi, edi
add eax, edx
je 0x405839
lea ebx, [ebx]
cmp dword [esp + 0x58], 8
mov ebp, dword [esp + 0x44]
jae 0x40561f
lea ebp, [esp + 0x44]
cmp edi, eax
jb 0x40562c
call fcn.00450357
mov esi, dword [esp + 0x24]
cmp dword [ebx + esi + 0x18], 8
jb 0x405639
mov esi, dword [ebx + esi + 4]
jmp 0x40563d
lea esi, [ebx + esi + 4]
push ebp
push esi
call fcn.00450de8
add esp, 8
test eax, eax
je 0x405675
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
inc edi
add eax, edx
add ebx, 0x1c
cmp edi, eax
jb 0x405610
jmp 0x405837
mov ebx, 0x490400
mov edi, 0x4903a8
call fcn.00407ca0
jmp 0x405837
cmp edi, ebx
mov dword [esp + 0x30], ebx
jle 0x405839
movzx ecx, bp
mov dword [esp + 0x38], ecx
xor ebp, ebp
jmp 0x4056a2
xor ebx, ebx
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x30], eax
jb 0x4056ce
call fcn.00450357
mov esi, dword [esp + 0x24]
cmp dword [esi + ebp + 0x18], 8
jb 0x4056db
mov esi, dword [esi + ebp + 4]
jmp 0x4056df
lea esi, [esi + ebp + 4]
mov ecx, dword [0x48b9d0]
mov dword [esp + 0x14], ecx
cmp esi, ebx
je 0x405739
mov edx, esi
shr edx, 0x10
test edx, edx
jne 0x405704
movzx ecx, si
lea edx, [esp + 0x14]
call fcn.0040d380
jmp 0x405739
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
cmp edi, ebx
je 0x405739
mov ecx, edi
lea edx, [esp + 0x14]
call fcn.0040e0f0
test eax, eax
je 0x405739
lea eax, [edi + edi]
lea ecx, [eax + 2]
cmp ecx, eax
jb 0x405739
mov edx, dword [esp + 0x14]
push eax
push esi
push edx
call fcn.00454ea0
add esp, 0xc
lea ebx, [esp + 0x14]
mov edi, 0x4903a8
mov byte [esp + 0x68], 3
call fcn.00407ca0
mov byte [esp + 0x68], 2
mov esi, dword [esp + 0x14]
lea eax, [esi - 0xc]
cmp eax, 0x48b9c0
je 0x405776
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x405776
push esi
call fcn.004501ef
add esp, 4
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x30]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp edi, ecx
jb 0x4057a4
call fcn.00450357
mov esi, dword [esp + 0x24]
mov ebx, 8
cmp dword [esi + ebp + 0x18], ebx
jb 0x4057b5
mov esi, dword [esi + ebp + 4]
jmp 0x4057b9
lea esi, [esi + ebp + 4]
push str.lang_code
push esi
push 0x4903c4
call fcn.00405120
cmp dword [esp + 0x38], eax
jne 0x405825
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x4057f9
call fcn.00450357
mov esi, dword [esp + 0x24]
cmp dword [esi + ebp + 0x18], ebx
jb 0x405805
mov esi, dword [esi + ebp + 4]
jmp 0x405809
lea esi, [esi + ebp + 4]
test esi, esi
jne 0x405811
xor eax, eax
jmp 0x405818
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
mov ebx, eax
mov esi, 0x490400
call fcn.0040e190
inc edi
add ebp, 0x1c
cmp edi, dword [esp + 0x3c]
mov dword [esp + 0x30], edi
jl 0x4056a0
xor ebx, ebx
call fcn.00405380
mov ecx, dword [0x4903b8]
sub ecx, dword [0x4903b4]
test ecx, 0xfffffffc
jne 0x405863
mov ebx, 0x490400
mov edi, 0x4903a8
call fcn.00407ca0
xor ebx, ebx
cmp dword [esp + 0x58], 8
jb 0x405877
mov edx, dword [esp + 0x44]
push edx
call fcn.0044fccf
add esp, 4
mov esi, dword [esp + 0x24]
xor eax, eax
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], ebx
mov word [esp + 0x44], ax
cmp esi, ebx
je 0x4058d7
mov edi, dword [esp + 0x28]
cmp esi, edi
je 0x4058ce
add esi, 0x18
lea ecx, [ecx]
cmp dword [esi], 8
jb 0x4058b1
mov ecx, dword [esi - 0x14]
push ecx
call fcn.0044fccf
add esp, 4
xor edx, edx
mov dword [esi], 7
mov dword [esi - 4], ebx
mov word [esi - 0x14], dx
add esi, 0x1c
lea eax, [esi - 0x18]
cmp eax, edi
jne 0x4058a0
mov esi, dword [esp + 0x24]
push esi
call fcn.0044fccf
add esp, 4
mov ecx, dword [esp + 0x18]
push ecx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call fcn.0044fccf
mov eax, dword [esp + 0x38]
lea edx, [eax - 0xc]
add esp, 4
cmp edx, 0x48b9c0
je 0x40591d
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40591d
mov eax, dword [esp + 0x34]
add eax, 0xfffffff4
push eax
call fcn.004501ef
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.0044fcda
add esp, 0x58
ret