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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x433549
mov eax, dword fs:[0]
push eax
sub esp, 0x42c
mov eax, dword [0x462074]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x434], eax
test ebx, ebx
je 0x405b04
test eax, eax
je 0x405b04
mov ecx, dword [eax]
xor esi, esi
mov dword [ebp - 0x430], ecx
mov edx, 0x437398
xor ecx, ecx
mov dword [eax], esi
push ecx
lea eax, [ebp - 0x21c]
mov word [ebp - 0x21c], cx
push eax
mov ecx, ebx
mov dword [ebp - 0x428], esi
mov dword [ebp - 0x424], esi
mov dword [ebp - 0x42c], esi
call fcn.00405b49
test eax, eax
je 0x40582c
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x424]
push eax
lea edx, [ebp - 0x428]
lea ecx, [ebp - 0x21c]
call fcn.004056f8
mov eax, dword [ebp - 0x424]
test eax, eax
jne 0x405875
push ecx
lea eax, [ebp - 0x21c]
mov edx, 0x43738c
push eax
mov ecx, ebx
call fcn.00405b49
test eax, eax
je 0x405a10
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x424]
push eax
lea edx, [ebp - 0x428]
lea ecx, [ebp - 0x21c]
call fcn.004056f8
mov eax, dword [ebp - 0x424]
test eax, eax
je 0x405a10
mov ebx, esi
cmp dword [ebp - 0x428], ebx
je 0x405a0c
mov ecx, eax
call fcn.00401cbf
mov dword [ebp - 0x420], eax
test eax, eax
je 0x405b00
mov edx, dword [ebp - 0x42c]
mov ecx, dword [ebp - 0x428]
push eax
push dword [ebp - 0x424]
call fcn.0040cbc5
test eax, eax
je 0x4059ee
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
movzx eax, ax
mov ebx, 0x437d34
mov dword [ebp - 0x424], eax
push dword [ebx - 4]
xor edx, edx
mov dword [ebp - 0x428], esi
cmp dword [ebx], esi
lea ecx, [ebp - 0x41c]
cmovne edx, eax
call fcn.0040567c
mov ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x428]
push eax
lea edx, [ebp - 0x41c]
call fcn.0040cc37
test eax, eax
je 0x40590d
mov ecx, dword [ebp - 0x428]
test ecx, ecx
jne 0x405924
add ebx, 8
cmp ebx, 0x437d74
jge 0x405a08
mov eax, dword [ebp - 0x424]
jmp 0x4058cc
test edi, edi
je 0x40598b
mov eax, ecx
mov edx, esi
cmp word [ecx], si
je 0x40593a
lea eax, [eax + 2]
inc edx
cmp word [eax], si
jne 0x405931
mov eax, dword [ebp - 0x430]
inc edx
cmp eax, edx
jb 0x40595a
add edx, edx
je 0x40598b
mov ebx, ecx
sub ebx, edi
mov al, byte [ebx + edi]
mov byte [edi], al
inc edi
sub edx, 1
jne 0x40594d
jmp 0x40598b
lea eax, [eax*2 - 2]
mov edx, edi
test eax, eax
je 0x40597e
mov ebx, ecx
mov ecx, eax
sub ebx, edi
mov al, byte [ebx + edx]
mov byte [edx], al
inc edx
sub ecx, 1
jne 0x40596d
mov ecx, dword [ebp - 0x428]
mov eax, dword [ebp - 0x430]
xor edx, edx
mov word [edi + eax*2 - 2], dx
mov eax, ecx
mov edx, esi
cmp word [ecx], si
je 0x40599d
lea eax, [eax + 2]
inc edx
cmp word [eax], si
jne 0x405994
mov edi, dword [ebp - 0x434]
xor ebx, ebx
inc ebx
mov dword [edi], edx
lea edi, [ecx - 0xc]
cmp edi, ecx
jae 0x4059ee
mov edx, dword [edi]
mov al, bl
add edx, ecx
mov ecx, esi
test al, al
je 0x4059e1
cmp byte [ecx + edi + 4], 0xab
sete al
inc ecx
cmp ecx, 8
jb 0x4059b7
test al, al
je 0x4059e1
mov cl, byte [esi + edx]
cmp cl, 0xab
sete al
inc esi
cmp esi, 8
jb 0x4059c9
cmp cl, 0xab
je 0x4059e7
call dword [sym.imp.KERNEL32.dll_DebugBreak]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x420]
test eax, eax
je 0x405b00
mov ecx, eax
call fcn.00401cf4
jmp 0x405b00
mov ebx, esi
jmp 0x4059ee
mov eax, ebx
jmp 0x4059f4
lea eax, [ebp - 0x420]
mov dword [ebp - 0x420], esi
push eax
push 0x20019
push ecx
mov edx, ebx
mov dword [ebp - 0x428], 0x208
mov ecx, Ordinal_1
call fcn.0040c5c8
test eax, eax
jne 0x405aea
movzx eax, byte [ebp - 0x21c]
xor ebx, ebx
xor ecx, ecx
inc ebx
cmp dword [ebp - 0x424], ebx
cmove eax, ecx
mov byte [ebp - 0x21c], al
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x424]
push eax
push esi
push esi
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405aea
mov edx, 0x438230
lea ecx, [ebp - 0x21c]
call fcn.0040c0b1
mov dword [ebp - 0x438], eax
test eax, eax
je 0x405aea
push 0x20
lea ecx, [eax + 0x14]
pop edx
call fcn.0040bda3
test eax, eax
je 0x405aea
mov edx, dword [ebp - 0x438]
xor ecx, ecx
mov word [eax], cx
mov ecx, edi
mov eax, dword [ebp - 0x430]
push eax
call fcn.0040bfdc
mov ecx, edi
call fcn.0040bd8c
mov edi, dword [ebp - 0x434]
mov dword [edi], eax
cmp dword [ebp - 0x420], esi
je 0x405b00
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x405b00
cmp dword [ebp - 0x420], esi
je 0x405afe
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, esi
mov eax, ebx
jmp 0x405b06
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043182e
leave
ret 0xc