Function at 0x40551b
Capabilities:
Check if file exists
Get file attributes
Identify system language via api

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
mov rax, qword [0x0040bba0]
mov rbp, qword [rax]
call qword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov rdx, qword [0x0040bbf0]
mov rsi, qword [rdx]
movzx edx, ax
lea rcx, [rsi + 0xc000]
add rsi, 0xa800
call fcn.00406eb9
call fcn.00404239
mov rax, qword [0x0040bb80]
mov rdi, qword [0x0040bb60]
mov rcx, rsi
mov eax, dword [rax]
mov dword [rdi + 0x1c], 0x10000
and eax, 0x20
mov dword [rdi], eax
call fcn.004073e1
test eax, eax
jne 0x405644
movsxd rdx, dword [rbp + 0x68]
test edx, edx
je 0x405644
mov rax, qword [0x0040bb30]
movsxd rcx, dword [rbp + 0x64]
add rdx, rdx
mov r9, qword [0x0040bc50]
mov r8, qword [rax + 0x24]
movsxd rax, dword [rbp + 0x6c]
mov dword [rsp + 0x20], 0
add rax, rax
add rdx, r8
add r8, rax
call fcn.00406e25
mov rbx, qword [0x0040bc50]
mov ax, word [rbx]
test ax, ax
je 0x405644
cmp ax, 0x22
jne 0x4055ef
lea rcx, [rbx + 2]
mov edx, 0x22
add rbx, 2
call fcn.00406940
mov word [rax], 0
mov rcx, rbx
call sub.KERNEL32.dll_lstrlenW
cdqe
add rax, rax
lea rcx, [rbx + rax - 8]
cmp rbx, rcx
jae 0x405631
lea rdx, str..exe
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x405631
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x405629
test al, 0x10
jne 0x405631
mov rcx, rbx
call fcn.00406968
mov rcx, rbx
call fcn.00406fab
mov rcx, rsi
mov rdx, rax
call fcn.00406f90
mov rcx, rsi
call fcn.004073e1
test eax, eax
jne 0x40565e
mov edx, dword [rbp + 0x138]
mov rcx, rsi
call fcn.004070be
mov rsi, qword [0x0040bb90]
mov dword [rsp + 0x28], 0x8040
xor r9d, r9d
mov r8d, 1
mov dword [rsp + 0x20], 0
mov edx, 0x67
mov rcx, qword [rsi]
call qword [sym.imp.USER32.dll_LoadImageW]
cmp dword [rbp + 0x70], 0xffffffff
mov qword [0x0043d000], rax
je 0x40575d
mov rdx, qword [0x0040bac0]
lea rbx, [0x0040b54a]
mov qword [0x00437560], rax
lea rcx, [0x00437540]
mov qword [0x00437580], rbx
mov qword [0x00437548], rdx
mov rdx, qword [rsi]
mov qword [0x00437558], rdx
call qword [sym.imp.USER32.dll_RegisterClassW]
test ax, ax
jne 0x4056e3
xor ebx, ebx
jmp 0x405865
xor r9d, r9d
lea r8, [rsp + 0x60]
xor edx, edx
mov ecx, 0x30
call qword [sym.imp.USER32.dll_SystemParametersInfoW]
mov ecx, dword [rsp + 0x64]
mov edx, dword [rsp + 0x60]
xor r8d, r8d
mov qword [rsp + 0x58], 0
mov rax, qword [rsi]
mov r9d, 0x80000000
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x50], rax
mov eax, dword [rsp + 0x6c]
mov dword [rsp + 0x20], edx
mov qword [rsp + 0x48], 0
sub eax, ecx
mov ecx, pe_nt_image_headers64
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x68]
mov qword [rsp + 0x40], 0
sub eax, edx
mov rdx, rbx
mov dword [rsp + 0x30], eax
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov qword [0x004375b0], rax
xor ecx, ecx
call fcn.004033a5
mov ebx, eax
test eax, eax
jne 0x405854
call fcn.00404239
cmp dword [rdi + 0x20], 0
jne 0x405836
mov rcx, qword [0x004375b0]
mov edx, 5
call qword [sym.imp.USER32.dll_ShowWindow]
lea rcx, str.RichEd20
call fcn.004076c5
test rax, rax
jne 0x4057ac
lea rcx, str.RichEd32
call fcn.004076c5
xor ecx, ecx
lea r8, [0x00437540]
lea rdx, str.RichEdit20W
mov rbx, qword [sym.imp.USER32.dll_GetClassInfoW]
call rbx
test eax, eax
jne 0x4057f6
xor ecx, ecx
lea r8, [0x00437540]
lea rdx, str.RichEdit
call rbx
lea rax, str.RichEdit20W
lea rcx, [0x00437540]
mov qword [0x00437580], rax
call qword [sym.imp.USER32.dll_RegisterClassW]
mov eax, dword [0x0043cfe8]
lea r9, [0x0040472f]
xor r8d, r8d
mov qword [rsp + 0x20], 0
mov rcx, qword [rsi]
lea edx, [rax + 0x69]
movzx edx, dx
call qword [sym.imp.USER32.dll_DialogBoxParamW]
mov ecx, 5
mov ebx, eax
call fcn.004033a5
mov ecx, 1
call fcn.004040e0
jmp 0x405865
xor ecx, ecx
call fcn.00404332
test eax, eax
je 0x40585b
cmp dword [0x0043cfc8], 0
jne 0x405854
mov ecx, 2
call fcn.004033a5
mov ebx, 2
jmp 0x405865
mov ecx, 1
call fcn.004033a5
mov eax, ebx
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
ret