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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x438cda
mov eax, dword fs:[0]
push eax
sub esp, 0x428
mov eax, dword [0x468080]
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 esi, edx
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x434], eax
test esi, esi
je 0x405a3a
test eax, eax
je 0x405a3a
mov ecx, dword [eax]
xor edx, edx
mov dword [ebp - 0x42c], ecx
xor ecx, ecx
mov dword [eax], edx
lea eax, [ebp - 0x21c]
push ecx
mov dword [ebp - 0x424], edx
mov dword [ebp - 0x428], edx
mov dword [ebp - 0x430], edx
mov edx, 0x43c308
mov word [ebp - 0x21c], cx
mov ecx, esi
push eax
call fcn.00405a7f
test eax, eax
je 0x405787
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x428]
push eax
lea edx, [ebp - 0x424]
lea ecx, [ebp - 0x21c]
call fcn.00405653
mov ebx, dword [ebp - 0x428]
test ebx, ebx
jne 0x4057d0
push ecx
lea eax, [ebp - 0x21c]
mov edx, 0x43c2fc
push eax
mov ecx, esi
call fcn.00405a7f
test eax, eax
je 0x405933
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x428]
push eax
lea edx, [ebp - 0x424]
lea ecx, [ebp - 0x21c]
call fcn.00405653
mov ebx, dword [ebp - 0x428]
test ebx, ebx
je 0x405933
xor esi, esi
cmp dword [ebp - 0x424], esi
je 0x40592f
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
pop ecx
xor ecx, ecx
mov dword [ebp - 0x420], eax
test eax, eax
je 0x405a36
mov edx, dword [ebp - 0x430]
mov ecx, dword [ebp - 0x424]
push eax
push ebx
call fcn.0040c7f2
test eax, eax
je 0x405910
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov ebx, dword [ebp - 0x420]
mov esi, 0x43ccb4
movzx eax, ax
mov dword [ebp - 0x428], eax
push dword [esi - 4]
xor ecx, ecx
xor edx, edx
cmp dword [esi], ecx
mov dword [ebp - 0x424], ecx
lea ecx, [ebp - 0x41c]
cmovne edx, eax
call fcn.004055d7
lea eax, [ebp - 0x424]
mov ecx, ebx
push eax
lea edx, [ebp - 0x41c]
call fcn.0040c864
test eax, eax
je 0x40586a
mov ecx, dword [ebp - 0x424]
test ecx, ecx
jne 0x405881
add esi, 8
cmp esi, 0x43ccf4
jge 0x40592b
mov eax, dword [ebp - 0x428]
jmp 0x40582b
xor ebx, ebx
test edi, edi
je 0x4058eb
mov eax, ecx
mov edx, ebx
cmp word [ecx], bx
je 0x405899
lea eax, [eax + 2]
inc edx
cmp word [eax], bx
jne 0x405890
mov eax, dword [ebp - 0x42c]
inc edx
cmp eax, edx
jb 0x4058b9
add edx, edx
je 0x4058eb
mov esi, ecx
sub esi, edi
mov al, byte [esi + edi]
mov byte [edi], al
inc edi
sub edx, 1
jne 0x4058ac
jmp 0x4058eb
lea eax, [eax*2 - 2]
mov edx, edi
mov ebx, eax
mov dword [ebp - 0x42c], eax
test ebx, ebx
je 0x4058e3
mov esi, ecx
sub esi, edi
mov al, byte [esi + edx]
mov byte [edx], al
inc edx
sub ebx, 1
jne 0x4058d2
mov eax, dword [ebp - 0x42c]
xor edx, edx
xor ebx, ebx
mov word [eax + edi], dx
mov edx, ecx
mov eax, ebx
cmp word [ecx], bx
je 0x4058fd
lea edx, [edx + 2]
inc eax
cmp word [edx], bx
jne 0x4058f4
mov edx, dword [ebp - 0x434]
push ecx
mov dword [edx], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor esi, esi
pop ecx
inc esi
mov eax, dword [ebp - 0x420]
test eax, eax
je 0x405a36
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
jmp 0x405a36
xor esi, esi
jmp 0x405910
mov eax, esi
jmp 0x405916
lea eax, [ebp - 0x420]
mov dword [ebp - 0x424], 0x208
push eax
push 0x20019
push ecx
xor ebx, ebx
mov edx, esi
mov ecx, Ordinal_1
mov dword [ebp - 0x420], ebx
call fcn.0040c1f1
test eax, eax
jne 0x405a20
movzx eax, byte [ebp - 0x21c]
xor esi, esi
xor ecx, ecx
inc esi
cmp dword [ebp - 0x428], esi
cmove eax, ecx
mov byte [ebp - 0x21c], al
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x428]
push eax
push ebx
push ebx
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405a20
mov edx, 0x43d1b0
lea ecx, [ebp - 0x21c]
call fcn.0040bcdf
mov ebx, eax
test ebx, ebx
jne 0x4059d7
cmp dword [ebp - 0x420], 0
je 0x4059d3
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
jmp 0x405a36
push 0x20
lea ecx, [ebx + 0x14]
pop edx
call fcn.0040b9ce
test eax, eax
je 0x4059be
push dword [ebp - 0x42c]
xor ecx, ecx
mov edx, ebx
mov word [eax], cx
mov ecx, edi
call fcn.0040bc07
mov ecx, edi
call fcn.0040b9b7
cmp dword [ebp - 0x420], 0
mov edx, dword [ebp - 0x434]
mov dword [edx], eax
je 0x405a36
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x405a36
cmp dword [ebp - 0x420], ebx
je 0x405a34
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, ebx
mov eax, esi
jmp 0x405a3c
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.004370bb
leave
ret 0xc