Function at 0x40d6da
Capabilities:
Identify system language via api

Disassembly:
mov eax, 0x40fbd7
call fcn.0040ee68
sub esp, 0x30
mov ecx, dword [ebp + 8]
push ebx
push esi
xor esi, esi
mov eax, dword [ecx + 8]
push edi
cmp eax, esi
jbe 0x40d9b6
push dword [ebp + 0xc]
xor eax, eax
cmp dword [0x414304], esi
push ecx
setne al
mov word [0x4142fc], ax
lea eax, [ebp - 0x2c]
push eax
call fcn.0040c4d2
add esp, 0xc
cmp dword [ebp - 0x24], esi
mov dword [ebp - 4], esi
jbe 0x40d999
push 0x2f17ffff
push 0xa7d7ffff
call fcn.00401d2a
add word [0x4142ec], ax
lea eax, [ebp - 0x2c]
push eax
call fcn.0040d52d
add esp, 0xc
cmp eax, 0xc8
mov dword [0x414318], 0x7fdfffff
jl 0x40d986
cmp eax, 0x12b
jg 0x40d986
or byte [0x4142e7], 0xff
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0040cf11
movsx eax, byte [0x4142e7]
push eax
mov byte [ebp - 4], 1
movsx eax, byte [0x4142e9]
push eax
call fcn.00401ce9
add byte [0x4142e9], al
add esp, 0x10
cmp dword [ebp - 0x18], esi
je 0x40d97a
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x18]
sar eax, 4
je 0x40d97a
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov edi, dword [0x4118a4]
add word [0x4142ee], ax
mov al, byte [edi]
add al, 0x2b
movzx eax, al
add eax, 3
and al, 0xfc
call fcn.0040edd0
mov ebx, dword [ebp - 0x18]
mov eax, esp
cmp ebx, esi
je 0x40d7ec
mov esi, dword [ebp - 0x14]
sub esi, ebx
sar esi, 4
push edi
push eax
call fcn.0040e0e8
mov edi, eax
push edi
call sub.MSVCRT.dll_strlen
add esp, 0xc
shl esi, 4
push eax
push 0
push edi
lea ecx, [esi + ebx - 0x10]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
mov esi, eax
mov dword [0x414314], 0xfbbfffff
cmp esi, 0xa
jg 0x40d824
test esi, esi
jge 0x40d826
xor esi, esi
push 0x821bffff
push 0x3e3fffff
call fcn.00401d79
mov dword [0x41430c], eax
push eax
movsx eax, byte [0x4142e7]
push eax
call fcn.00401bcc
add word [0x4142ee], ax
add esp, 0x10
test esi, esi
jle 0x40d8f2
mov ecx, dword [ebp - 0x18]
mov word [0x4142f8], 1
test ecx, ecx
jne 0x40d86e
xor eax, eax
jmp 0x40d876
mov eax, dword [ebp - 0x14]
sub eax, ecx
sar eax, 4
shl eax, 4
push esi
lea edx, [ebp - 0x3c]
push 0
push edx
lea ecx, [eax + ecx - 0x10]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
push 0xf9dfffff
mov byte [ebp - 4], 2
push dword [0x414324]
call fcn.00401c1e
add byte [0x4142e1], al
push 0xc643ffff
push dword [0x414304]
inc esi
inc esi
call fcn.00401dcc
mov word [0x4142fa], ax
lea eax, [ebp - 0x3c]
push eax
call fcn.00408390
mov edi, eax
push 0x99edffff
movsx eax, word [0x4142fc]
push eax
call fcn.00401e15
add esp, 0x1c
lea ecx, [ebp - 0x3c]
mov dword [0x414320], eax
mov byte [ebp - 4], 1
push 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x40d90c
mov ecx, dword [ebp - 0x18]
test ecx, ecx
jne 0x40d8fd
xor eax, eax
jmp 0x40d905
mov eax, dword [ebp - 0x14]
sub eax, ecx
sar eax, 4
shl eax, 4
mov edi, dword [eax + ecx - 8]
push 0xc46bffff
push 0xf807ffff
call fcn.00401c1e
pop ecx
mov word [0x4142fc], ax
pop ecx
mov ecx, dword [ebp - 0x18]
test ecx, ecx
jne 0x40d92e
xor eax, eax
jmp 0x40d936
mov eax, dword [ebp - 0x14]
sub eax, ecx
sar eax, 4
shl eax, 4
push edi
lea edx, [ebp - 0x3c]
push esi
push edx
lea ecx, [eax + ecx - 0x10]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [ebp - 4], 3
push dword [ecx]
mov ecx, dword [ebp + 0x10]
push 0
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [ebp - 0x3c]
pop esi
mov byte [ebp - 4], 1
push esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
or word [0x4142f4], 0xffff
and byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.0040da32
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, esi
jmp 0x40d9b8
push 0xffffffffffffffff
call dword [sym.imp.USER32.dll_IsCharUpperA]
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x2c]
mov word [0x4142fa], ax
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
xor eax, eax
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x48]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret