Function at 0x40d620
Capabilities:
Identify system language via api
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x49fc2c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x134
push ebx
xor ebx, ebx
push esi
mov esi, ecx
push ebx
push str.SSMGR_E1E46220260449EF84451F49ADE7068B
mov dword [esp + 0x2c], esi
call dword [sym.imp.USER32.dll_FindWindowA]
cmp eax, ebx
je 0x40d684
push 0x8225
push 0x7922
push 0xbce
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x134]
mov dword fs:[0], ecx
add esp, 0x140
ret
push ebp
push edi
push ebx
call fcn.00419075
add esp, 4
mov ecx, esi
call fcn.0049c4a2
mov al, byte [esp + 0x17]
push ebx
lea ecx, [esp + 0x20]
mov byte [esp + 0x20], al
call fcn.00401080
mov edi, str.software_starsecproduct
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x20]
push ebp
call fcn.00401210
test al, al
je 0x40d6ec
mov edi, dword [esp + 0x20]
mov ecx, ebp
mov edx, ecx
mov esi, str.software_starsecproduct
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x20]
call fcn.004011f0
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x41]
mov byte [esp + 0x40], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x20]
xor esi, esi
cmp eax, ebx
mov dword [esp + 0x14c], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], 0x104
jne 0x40d722
mov eax, 0x4a3668
lea ecx, [esp + 0x10]
push ecx
push 1
push ebx
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40d785
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x18]
lea eax, [esp + 0x40]
push edx
push eax
push ebx
push ebx
push str.F85FA022_5B17_449E_BB59_5F794049668D_GD
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40d776
lea edx, [esp + 0x40]
push edx
call fcn.004214c3
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x40d776
push esi
call fcn.00414940
add esp, 4
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, ebx
jne 0x40d78b
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov cl, byte [esp + 0x17]
push ebx
mov byte [esp + 0x34], cl
lea ecx, [esp + 0x34]
call fcn.00401080
mov edi, str.lang_ssMgr_cib
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x34]
push ebp
call fcn.00401210
test al, al
je 0x40d7e2
mov edi, dword [esp + 0x34]
mov ecx, ebp
mov edx, ecx
mov esi, str.lang_ssMgr_cib
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x38], ebp
mov byte [eax + ebp], bl
lea ecx, [esp + 0x30]
mov byte [esp + 0x14c], 1
push ecx
call fcn.00414950
add esp, 4
lea ecx, [esp + 0x30]
mov byte [esp + 0x14c], bl
push 1
call fcn.00401080
mov eax, dword [0x4db094]
pop edi
cmp eax, ebx
pop ebp
je 0x40d843
push 1
lea ecx, [esp + 0x18]
mov dword [esp + 0x148], 0xffffffff
call fcn.00401080
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x134]
mov dword fs:[0], ecx
add esp, 0x140
ret
push 0x38
call fcn.00495af5
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, ebx
mov byte [esp + 0x144], 2
je 0x40d866
mov ecx, eax
call fcn.00409ab0
jmp 0x40d868
xor eax, eax
mov ecx, eax
mov byte [esp + 0x144], bl
mov dword [0x4db094], eax
call fcn.00409c00
cmp eax, ebx
je 0x40d92d
cmp eax, 6
je 0x40d8cc
mov edx, dword [0x4cdf5c]
mov dword [esp + 8], edx
push eax
lea eax, [esp + 0xc]
push str.Initialize_PKCS11_library_failed.__0x_08X_
push eax
mov byte [esp + 0x150], 3
call fcn.00490a04
mov ecx, dword [esp + 0x14]
add esp, 0xc
push ebx
push 0x10
push ecx
call fcn.00498b28
lea ecx, [esp + 8]
mov byte [esp + 0x144], bl
call fcn.0049572d
jmp 0x40d8d9
push ebx
push 0x10
push str.Can_not_load_the_PKCS11_library.
call fcn.00498b28
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
je 0x40d914
mov al, byte [ecx - 1]
cmp al, bl
je 0x40d90a
cmp al, 0xff
je 0x40d90a
dec al
pop esi
mov byte [ecx - 1], al
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x134]
mov dword fs:[0], ecx
add esp, 0x140
ret
dec ecx
push ecx
call fcn.00495b1e
add esp, 4
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x134]
mov dword fs:[0], ecx
add esp, 0x140
ret
push 0x258
call fcn.00495af5
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, ebx
mov byte [esp + 0x144], 4
je 0x40d955
mov ecx, eax
call fcn.004080b0
mov esi, eax
jmp 0x40d957
xor esi, esi
mov edx, dword [esp + 0x24]
mov byte [esp + 0x144], bl
mov dword [edx + 0x1c], esi
mov ecx, dword [0x4db094]
call fcn.00409d30
mov eax, dword [esi]
push ebx
push ebx
push 0xcf8000
push 0x80
mov ecx, esi
call dword [eax + 0xb8]
push 1
push 0x64
push 0xc8
push 0x64
push 0x32
mov ecx, esi
call fcn.00494d9d
push 6
mov ecx, esi
call fcn.00494e2d
push ebx
mov ecx, esi
call fcn.00494e2d
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
je 0x40d9cf
mov al, byte [ecx - 1]
cmp al, bl
je 0x40d9c5
cmp al, 0xff
je 0x40d9c5
dec al
mov byte [ecx - 1], al
jmp 0x40d9cf
dec ecx
push ecx
call fcn.00495b1e
add esp, 4
mov ecx, dword [esp + 0x13c]
pop esi
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x140
ret