Function at 0x140005a2d
Capabilities:
Get geographical location
Get keyboard layout
Identify system language via api

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x178
lea rax, [rsp + 0x6c]
mov r13d, edx
lea rsi, [rsp + 0x68]
mov r12, rcx
mov qword [rsp + 0x48], rax
mov rcx, rax
call qword [sym.imp.USER32.dll_GetKeyboardLayoutNameA]
mov rcx, qword [rsp + 0x48]
mov r8, rsi
lea rdx, [0x14008675d]
call sub.msvcrt.dll_sscanf
test eax, eax
jne 0x140005a8a
lea rcx, str.Could_not_scan_keyboard_layout_name___falling_back_to_US_as_default_n
call fcn.1400380b9
mov dword [rsp + 0x68], 0x409
mov edx, dword [rsp + 0x68]
lea rcx, str.Windows_KBID_0x_08x_n
call fcn.1400380b9
xor edx, edx
mov eax, dword [rsp + 0x68]
cmp eax, 0x46e
ja 0x140005e3a
cmp eax, 0x401
ja 0x140005ac3
lea ecx, [rax - 1]
cmp ecx, 0x43
jbe 0x140005c02
jmp case.0x1400060b0.132099
lea ecx, [rax - 0x402]
cmp ecx, 0x6c
ja case.0x1400060b0.132099
lea r8, [0x140086b48]
movsxd rcx, dword [r8 + rcx*4]
add rcx, r8
jmp rcx
lea r14, [0x1400865c5]
jmp 0x140006424
lea r14, [0x14008663a]
jmp 0x140006424
lea r14, [0x140086637]
jmp 0x140006424
lea r14, [0x140086631]
jmp 0x140006424
lea r14, [0x140086628]
jmp 0x140006424
lea r14, [0x140086625]
jmp 0x140006424
lea r14, [0x140086619]
jmp 0x140006424
lea r14, [0x140086610]
jmp 0x140006424
lea r14, [0x14008660a]
jmp 0x140006424
lea r14, [0x140086607]
jmp 0x140006424
lea r14, [0x140086604]
jmp 0x140006424
lea r14, [0x1400865fe]
jmp 0x140006424
lea r14, [0x1400865fb]
jmp 0x140006424
lea r14, [0x1400865f8]
jmp 0x140006424
lea r14, [0x1400865f5]
jmp 0x140006424
lea r14, [0x1400865ef]
jmp 0x140006424
lea r14, [0x1400865e9]
jmp 0x140006424
lea r14, [0x1400865d4]
jmp 0x140006424
lea r14, [0x1400865bf]
jmp 0x140006424
lea r14, [0x1400865b9]
jmp 0x140006424
lea r14, [0x1400865b6]
jmp 0x140006424
lea r14, [0x1400865b3]
jmp 0x140006424
lea r14, [0x1400865b0]
jmp 0x140006424
lea r14, [0x140086640]
jmp 0x140006424
lea r8, [0x140086cfc]
movsxd rcx, dword [r8 + rcx*4]
add rcx, r8
jmp rcx
lea r14, [0x14008664f]
jmp 0x140006424
lea r14, [0x14008664c]
jmp 0x140006424
lea r14, [0x140086646]
jmp 0x140006424
lea r14, [0x140086643]
jmp 0x140006424
lea r14, [0x140086640]
jmp 0x140006424
lea r14, [0x14008663d]
jmp 0x140006424
lea r14, [0x140086637]
jmp 0x140006424
lea r14, [0x140086634]
jmp 0x140006424
lea r14, [0x140086631]
jmp 0x140006424
lea r14, [0x14008662e]
jmp 0x140006424
lea r14, [0x14008662b]
jmp 0x140006424
lea r14, [0x140086628]
jmp 0x140006424
lea r14, [0x140086625]
jmp 0x140006424
lea r14, [0x140086622]
jmp 0x140006424
lea r14, [0x14008661f]
jmp 0x140006424
lea r14, [0x14008661c]
jmp 0x140006424
lea r14, [0x140086619]
jmp 0x140006424
lea r14, [0x140086616]
jmp 0x140006424
lea r14, [0x140086613]
jmp 0x140006424
lea r14, [0x140086610]
jmp 0x140006424
lea r14, [0x14008660a]
jmp 0x140006424
lea r14, [0x140086607]
jmp 0x140006424
lea r14, [0x140086604]
jmp 0x140006424
lea r14, [0x1400865fe]
jmp 0x140006424
lea r14, [0x1400865fb]
jmp 0x140006424
lea r14, [0x1400865f8]
jmp 0x140006424
lea r14, [0x1400865f5]
jmp 0x140006424
lea r14, [0x1400865f2]
jmp 0x140006424
lea r14, [0x1400865ef]
jmp 0x140006424
lea r14, [0x1400865ec]
jmp 0x140006424
lea r14, [0x1400865e9]
jmp 0x140006424
lea r14, [0x1400865e6]
jmp 0x140006424
lea r14, [0x1400865dd]
jmp 0x140006424
lea r14, [0x1400865da]
jmp 0x140006424
lea r14, [0x1400865d4]
jmp 0x140006424
lea r14, [0x1400865bf]
jmp 0x140006424
lea r14, [0x1400865b9]
jmp 0x140006424
lea r14, [0x1400865b6]
jmp 0x140006424
lea r14, [0x1400865b3]
jmp 0x140006424
lea r14, [0x1400865b0]
jmp 0x140006424
lea r14, [0x1400865ad]
jmp 0x140006424
lea r14, [0x14008663a]
jmp 0x140006424
lea r14, [0x140086634]
jmp 0x140006424
lea r14, [0x14008661c]
jmp 0x140006424
lea r14, [0x140086616]
jmp 0x140006424
lea r14, [0x1400865da]
jmp 0x140006424
cmp eax, 0x1043b
ja 0x140006070
cmp eax, 0x10400
jbe 0x140005f6b
lea ecx, [rax - 0x10401]
cmp ecx, 0x3a
ja case.0x1400060b0.132099
lea r8, [0x140086e0c]
movsxd rcx, dword [r8 + rcx*4]
add rcx, r8
jmp rcx
lea r14, [0x140086640]
jmp 0x140006424
lea r14, [0x14008663a]
jmp 0x140006424
lea r14, [0x1400865cb]
jmp 0x140006424
lea r14, [0x1400865bf]
jmp 0x140006424
lea r14, [0x1400865b3]
jmp 0x140006424
lea r14, [0x1400865ad]
jmp 0x140006424
lea r14, [0x140086637]
jmp 0x140006424
lea r14, [0x140086631]
jmp 0x140006424
lea r14, [0x140086625]
jmp 0x140006424
lea r14, [0x140086619]
jmp 0x140006424
lea r14, [0x140086610]
jmp 0x140006424
lea r14, [0x140086607]
jmp 0x140006424
lea r14, [0x1400865fe]
jmp 0x140006424
lea r14, [0x1400865fb]
jmp 0x140006424
lea r14, [0x1400865f8]
jmp 0x140006424
lea r14, [0x1400865ef]
jmp 0x140006424
lea r14, [0x1400865e9]
jmp 0x140006424
lea r14, [0x1400865d4]
jmp 0x140006424
lea r14, [0x1400865b9]
jmp 0x140006424
lea r14, [0x140086628]
jmp 0x140006424
lea r14, [0x140086604]
jmp 0x140006424
cmp eax, 0x82c
je 0x14000630f
ja 0x140005fd3
lea ecx, [rax - 0x804]
cmp ecx, 0x16
ja case.0x1400060b0.132099
lea r8, [0x140086ef8]
movsxd rcx, dword [r8 + rcx*4]
add rcx, r8
jmp rcx
lea r14, [0x1400865d7]
jmp 0x140006424
lea r14, [0x1400865c5]
jmp 0x140006424
lea r14, [0x1400865b0]
jmp 0x140006424
lea r14, [0x14008660a]
jmp 0x140006424
lea r14, [0x1400865f5]
jmp 0x140006424
cmp eax, 0x1009
je 0x14000631b
ja 0x14000602e
cmp eax, 0xc0c
je 0x140006327
ja 0x140006013
cmp eax, 0x843
je 0x140006333
cmp eax, 0xc04
je 0x14000633f
cmp eax, 0x83b
je 0x14000634b
jmp case.0x1400060b0.132099
cmp eax, 0xc1a
je 0x140006357
cmp eax, 0x1004
je 0x140006363
jmp case.0x1400060b0.132099
cmp eax, 0x100c
je 0x14000636f
cmp eax, 0x100b
jbe case.0x1400060b0.132099
cmp eax, 0x201a
je 0x14000637b
ja case.0x1400060b0.132099
cmp eax, 0x1404
je 0x140006387
cmp eax, 0x1809
je 0x140006393
jmp case.0x1400060b0.132099
cmp eax, 0x20427
je 0x14000639f
ja 0x140006129
cmp eax, 0x20409
ja 0x14000610e
cmp eax, 0x20400
jbe 0x1400060d6
lea ecx, [rax - 0x20401]
cmp ecx, 8
ja case.0x1400060b0.132099
lea r8, [0x140086f54]
movsxd rcx, dword [r8 + rcx*4]
add rcx, r8
jmp rcx
lea r14, [0x1400865bf]
jmp 0x140006424
lea r14, [0x1400865ad]
jmp 0x140006424
lea r14, [0x1400865b3]
jmp 0x140006424
cmp eax, 0x1083b
je 0x1400063a8
ja 0x1400060f3
cmp eax, 0x1080c
je 0x1400063b1
jmp case.0x1400060b0.132099
cmp eax, 0x11009
je 0x1400063ba
cmp eax, 0x11809
je 0x1400063c3
jmp case.0x1400060b0.132099
cmp eax, 0x20418
je 0x1400063cc
cmp eax, 0x20422
je 0x1400063d5
jmp case.0x1400060b0.132099
cmp eax, 0x40402
je 0x1400063de
ja 0x14000616d
cmp eax, 0x30409
je 0x1400063e7
ja case.0x1400060b0.132099
cmp eax, 0x30402
je 0x1400063f0
cmp eax, 0x30408
je 0x1400063f9
cmp eax, 0x20437
je 0x140006402
jmp case.0x1400060b0.132099
cmp eax, 0x40409
je 0x14000640b
ja 0x14000618a
cmp eax, 0x40408
je 0x140006414
jmp case.0x1400060b0.132099
cmp eax, 0x50409
je case.0x1400060b0.132105
lea ecx, [rax - 0x50408]
and ecx, 0xfffeffff
jne case.0x1400060b0.132099
jmp 0x14000641d
lea r14, [0x1400865dd]
jmp 0x140006424
lea r14, [0x1400865e0]
jmp 0x140006424
lea r14, [0x1400865e6]
jmp 0x140006424
lea r14, [0x1400865ec]
jmp 0x140006424
lea r14, [0x1400865f2]
jmp 0x140006424
lea r14, [0x140086601]
jmp 0x140006424
lea r14, [0x140086613]
jmp 0x140006424
lea r14, [0x14008661f]
jmp 0x140006424
lea r14, [0x140086622]
jmp 0x140006424
lea r14, [0x14008662b]
jmp 0x140006424
lea r14, [0x14008662e]
jmp 0x140006424
lea r14, [0x14008663d]
jmp 0x140006424
lea r14, [0x140086643]
jmp 0x140006424
lea r14, [0x140086646]
jmp 0x140006424
lea r14, [0x140086649]
jmp 0x140006424
lea r14, [0x14008664c]
jmp 0x140006424
lea r14, [0x14008664f]
jmp 0x140006424
test edx, edx
jne 0x14000628f
and eax, 0x3ff
mov edx, 1
mov dword [rsp + 0x68], eax
jmp 0x140005a9c
dec edx
jne 0x1400062bb
call qword [sym.imp.KERNEL32.DLL_GetSystemDefaultLangID]
lea rcx, str.Unable_to_match_KBID__trying_LangID_0x_04x_n
mov edx, eax
and edx, 0x3ff
mov dword [rsp + 0x68], edx
call fcn.1400380b9
mov edx, 2
jmp 0x140005a9c
lea rcx, str.Unable_to_match_KBID_and_LangID___defaulting_to_US_n
call fcn.1400380b9
lea r14, [0x1400865c2]
jmp 0x140006424
lea r14, [0x1400865aa]
jmp 0x140006424
lea r14, [0x1400865aa]
jmp 0x140006424
lea r14, [0x1400865bc]
jmp 0x140006424
lea r14, [0x1400865ad]
jmp 0x140006424
lea r14, [0x1400865aa]
jmp 0x140006424
lea r14, [0x140086634]
jmp 0x140006424
lea r14, [0x1400865c8]
jmp 0x140006424
lea r14, [0x1400865c8]
jmp 0x140006424
lea r14, [0x140086649]
jmp 0x140006424
lea r14, [0x1400865b0]
jmp 0x140006424
lea r14, [0x140086616]
jmp 0x140006424
lea r14, [0x14008660d]
jmp 0x140006424
lea r14, [0x1400865b0]
jmp 0x140006424
lea r14, [0x1400865e3]
jmp 0x140006424
lea r14, [0x14008660d]
jmp 0x140006424
lea r14, [0x1400865b0]
jmp 0x140006424
lea r14, [0x1400865c5]
jmp 0x140006424
lea r14, [0x140086628]
jmp 0x140006424
lea r14, [0x1400865da]
jmp 0x140006424
lea r14, [0x1400865e0]
jmp 0x140006424
lea r14, [0x1400865c8]
jmp 0x140006424
lea r14, [0x1400865c5]
jmp 0x140006424
lea r14, [0x140086604]
jmp 0x140006424
lea r14, [0x14008661c]
jmp 0x140006424
lea r14, [0x1400865ad]
jmp 0x140006424
lea r14, [0x1400865ce]
jmp 0x140006424
lea r14, [0x1400865ad]
jmp 0x140006424
lea r14, [0x1400865bf]
jmp 0x140006424
lea r14, [0x14008663a]
jmp 0x140006424
lea r14, [0x1400865d1]
jmp 0x140006424
lea r14, [0x1400865bf]
jmp 0x140006424
lea r14, [0x1400865bf]
mov rcx, r14
test r13d, r13d
je 0x140006433
call fcn.140005880
jmp 0x140006438
call fcn.1400058f0
mov dword [rsp + 0x58], eax
cmp dword [rsp + 0x58], 0
jns 0x140006496
lea rcx, str.Keyboard_id__s_is_not_supported___falling_back_to_us_n
mov rdx, r14
call fcn.1400380b9
test r13d, r13d
lea rcx, [0x1400865c2]
je 0x140006465
call fcn.140005880
jmp 0x14000646a
call fcn.1400058f0
mov dword [rsp + 0x58], eax
cmp dword [rsp + 0x58], 0
lea r14, [0x1400865c2]
jns 0x140006496
mov r8d, 0x3d9
lea rdx, str.dos_locale.c
lea rcx, str.kbdrv___0
call qword [sym.imp.msvcrt.dll__wassert]
mov rcx, r14
call fcn.1400059a9
mov rdx, r14
lea rcx, str.Will_use_DOS_keyboard__s___s__n
mov r8, rax
call fcn.1400380b9
call qword [sym.imp.KERNEL32.DLL_GetOEMCP]
mov ebx, eax
cmp eax, 0xfde9
jne 0x1400064e8
call qword [sym.imp.KERNEL32.DLL_GetUserDefaultUILanguage]
mov r9d, 4
mov r8, rsi
mov edx, 0x2000000b
movzx ecx, ax
call qword [sym.imp.KERNEL32.DLL_GetLocaleInfoA]
test eax, eax
je case.0x140006701.30035
mov ebx, dword [rsp + 0x68]
test r13d, r13d
je 0x140006795
cmp ebx, 0xbcd
je case.0x140006701.30022
ja 0x140006630
cmp ebx, 0x383
ja 0x1400065e4
cmp ebx, 0x34f
ja 0x14000655e
cmp ebx, 0x316
ja 0x1400065d2
cmp ebx, 0x301
ja 0x140006595
cmp ebx, 0x29c
ja 0x1400065c0
cmp ebx, 0x29a
ja case.0x1400065b2.790
cmp ebx, 0x71
je case.0x14000657b.851
lea rbp, str.ega.cpx
cmp ebx, 0x1b5
jmp 0x140006781
lea eax, [rbx - 0x350]
cmp eax, 0x33
ja case.0x140006701.30035
lea rdx, [0x140086f78]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
lea rbp, str.ega9.cpx
jmp 0x1400068b5
lea rbp, str.ega.cpx
jmp 0x1400068b5
lea eax, [rbx - 0x302]
cmp eax, 0x14
ja case.0x140006701.30035
lea rdx, [0x140087048]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
lea rbp, str.ega8.cpx
jmp 0x1400068b5
lea rbp, str.ega5.cpx
cmp ebx, 0x2e1
jmp 0x140006781
lea rbp, str.ega3.cpx
cmp ebx, 0x328
jmp 0x140006781
cmp ebx, 0x465
je case.0x14000657b.848
ja 0x140006612
cmp ebx, 0x3df
je case.0x1400065b2.790
lea eax, [rbx - 0x45c]
cmp eax, 3
jbe case.0x14000657b.859
jmp case.0x140006701.30035
lea rbp, str.ega4.cpx
cmp ebx, 0x46b
je 0x1400068b5
cmp ebx, 0xbc4
jmp 0x140006781
cmp ebx, 0x7543
ja 0x1400066dc
cmp ebx, 0x7539
jbe 0x140006680
lea ecx, [rbx - 0x753a]
mov eax, 1
lea rbp, str.ega7.cpx
shl rax, cl
test eax, 0x39a
jne 0x1400068b5
test al, 0x64
lea r11, str.ega4.cpx
lea rax, str.ega14.cpx
cmove rax, r11
mov rbp, rax
jmp 0x1400068b5
cmp ebx, 0x752f
jbe 0x1400066bb
lea eax, [rbx - 0x7532]
cmp eax, 6
ja case.0x1400066a1.30004
lea rdx, [0x14008709c]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
lea rbp, str.ega11.cpx
jmp 0x1400068b5
lea rbp, str.ega12
jmp 0x1400068b5
lea eax, [rbx - 0xf06]
and eax, 0xfffffffd
je case.0x14000657b.856
lea rbp, str.ega10.cpx
cmp ebx, 0xf05
jmp 0x140006781
cmp ebx, 0x7558
ja 0x14000670f
lea eax, [rbx - 0x7544]
cmp eax, 0x14
ja case.0x140006701.30035
lea rdx, [0x1400870b8]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
lea rbp, str.ega15.cpx
jmp 0x1400068b5
cmp ebx, 0xe762
je case.0x1400066a1.30002
ja 0x14000674b
cmp ebx, 0xe362
je case.0x1400066a1.30008
lea rbp, str.ega12
cmp ebx, 0xe3df
je 0x1400068b5
lea rbp, str.ega13.cpx
cmp ebx, 0xe328
jmp 0x140006781
cmp ebx, 0xedb5
je case.0x1400066a1.30008
ja 0x140006774
lea rbp, str.ega6.cpx
cmp ebx, 0xe9b5
je 0x1400068b5
cmp ebx, 0xeb62
jmp 0x140006781
lea rbp, str.ega13.cpx
cmp ebx, 0xf362
je 0x1400068b5
jmp case.0x140006701.30035
lea rbp, str.ega17.cpx
jmp 0x1400068b5
cmp ebx, 0x365
ja case.0x140006701.30035
cmp ebx, 0x351
ja 0x1400067ca
cmp ebx, 0x2e1
je 0x1400068a5
cmp ebx, 0x307
je 0x1400068ae
cmp ebx, 0x1b5
jne case.0x140006701.30035
jmp 0x14000689c
lea ecx, [rbx - 0x352]
mov eax, 1
shl rax, cl
test eax, 0xa405
jne 0x14000689c
test eax, 0x80880
jne 0x1400068a5
test eax, 0x10020
jne 0x1400068ae
mov ecx, ebx
call fcn.140005960
mov edx, ebx
lea rcx, str.Unable_to_find_an_EGA_file_with_codepage__d___s__n
mov r8, rax
call fcn.1400380b9
movsxd rax, dword [rsp + 0x58]
lea rdx, str.keyboard.sys
lea r11, str.ega.cpi
shl rax, 4
test r13d, r13d
mov ebx, dword [rdx + rax + 8]
lea rax, str.ega.cpx
cmove rax, r11
mov rbp, rax
jmp 0x1400068c8
lea rbp, str.ega3.cpx
jmp 0x1400068b5
lea rbp, str.ega16.cpx
jmp 0x1400068b5
lea rbp, str.ega5.cpx
jmp 0x1400068b5
lea rbp, str.ega14.cpx
jmp 0x1400068b5
lea rbp, str.ega2.cpx
jmp 0x1400068b5
lea rbp, str.ega4.cpx
jmp 0x1400068b5
lea rbp, str.ega10.cpx
jmp 0x1400068b5
lea rbp, str.ega18.cpx
jmp 0x1400068b5
lea rbp, str.ega13.cpx
jmp 0x1400068b5
lea rbp, str.ega6.cpx
jmp 0x1400068b5
lea rbp, str.ega.cpi
jmp 0x1400068b5
lea rbp, str.ega2.cpi
jmp 0x1400068b5
lea rbp, str.ega3.cpi
test r13d, r13d
je 0x1400068c8
cmp ebx, 0x352
mov eax, 0x35a
cmove ebx, eax
mov ecx, ebx
call fcn.140005960
mov edx, ebx
lea rcx, str.Will_use_codepage__d___s__n
mov r8, rax
call fcn.1400380b9
cmp ebx, 0x1b5
jne 0x1400069f9
lea r15, [0x1400865c2]
mov rcx, r14
mov rdx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400069f9
mov ecx, 1
test r12, r12
je 0x140006928
mov rcx, r12
call sub.msvcrt.dll_strlen
lea rcx, [rax + 1]
mov eax, 0x104
cmp rcx, rax
cmova rcx, rax
mov rdi, qword [rsp + 0x48]
mov ecx, ecx
mov rsi, r12
mov ebx, 0x103
rep movsb byte [rdi], byte [rsi]
mov rcx, r12
call sub.msvcrt.dll_strlen
mov rcx, qword [rsp + 0x48]
lea rdx, [rax + 1]
cmp rdx, 0x104
cmovae rax, rbx
mov byte [rsp + rax + 0x6c], 0
call sub.msvcrt.dll_strlen
mov r8d, 0xe
mov rcx, qword [rsp + 0x48]
lea rdx, str.AUTOEXEC.BAT
sub rbx, rax
cmp rbx, r8
cmovbe r8, rbx
call sub.msvcrt.dll_strncat
mov rcx, qword [rsp + 0x48]
lea rdx, [0x1400868e6]
call sub.msvcrt.dll_fopen
mov rbx, rax
test rax, rax
je 0x140006c3d
mov rdx, rax
lea rcx, str._echo_off_n
call sub.msvcrt.dll_fputs
mov rdx, rbx
lea rcx, str.set_PATH.__LOCALE_n
call sub.msvcrt.dll_fputs
mov ecx, 0x1b5
call fcn.140005960
mov rcx, r15
mov qword [rsp + 0x48], rax
call fcn.1400059a9
mov dword [rsp + 0x20], 0x1b5
mov rcx, rbx
mov r9, qword [rsp + 0x48]
mov r8, rax
lea rdx, str.echo_Using__s_keyboard_with__s_codepage___d__n
call sub.msvcrt.dll_fprintf
mov rcx, rbx
jmp 0x140006d00
mov ecx, 1
test r12, r12
je 0x140006a1b
mov rcx, r12
call sub.msvcrt.dll_strlen
lea rcx, [rax + 1]
mov eax, 0x104
cmp rcx, rax
cmova rcx, rax
mov rdi, qword [rsp + 0x48]
mov ecx, ecx
mov rsi, r12
mov r15d, 0x103
rep movsb byte [rdi], byte [rsi]
mov rcx, r12
call sub.msvcrt.dll_strlen
mov rcx, qword [rsp + 0x48]
lea rdx, [rax + 1]
cmp rdx, 0x104
cmovae rax, r15
mov byte [rsp + rax + 0x6c], 0
call sub.msvcrt.dll_strlen
mov r8d, 0xc
mov rcx, qword [rsp + 0x48]
lea rdx, str.CONFIG.SYS
sub r15, rax
cmp r15, r8
cmovbe r8, r15
call sub.msvcrt.dll_strncat
mov rcx, qword [rsp + 0x48]
lea rdx, [0x1400868e6]
call sub.msvcrt.dll_fopen
mov r15, rax
test rax, rax
jne 0x140006aa8
call fcn.140038579
lea rcx, str.Unable_to_create_CONFIG.SYS:__s._n
mov rdx, rax
call fcn.1400380b9
xor eax, eax
jmp 0x140006d16
mov rdx, rax
lea rcx, str._MENU__n
test r13d, r13d
je 0x140006acd
lea rcx, str._MENUCOLOR7_0_nMENU_nMENU___FreeDOS_Language_Selection_Menu_n
call sub.msvcrt.dll_fputs
mov rdx, r15
lea rcx, str.MENU
call sub.msvcrt.dll_fputs
mov rdx, r15
lea rcx, str.MENUDEFAULT1_5_n
call sub.msvcrt.dll_fputs
mov ecx, ebx
call fcn.140005960
mov rcx, r14
mov rsi, rax
call fcn.1400059a9
cmp r13d, 1
mov dword [rsp + 0x30], ebx
mov rcx, r15
sbb r9d, r9d
mov qword [rsp + 0x28], rsi
lea rdx, [0x140086712]
lea r8, str.MENUITEM
and r9d, 3
mov qword [rsp + 0x20], rax
add r9d, 0x29
test r13d, r13d
cmovne r8, rdx
lea rdx, str._s1_c_Use__s_keyboard_with__s_codepage___d__n
mov dword [rsp + 0x5c], r9d
mov qword [rsp + 0x50], r8
call sub.msvcrt.dll_fprintf
mov ecx, 0x1b5
call fcn.140005960
lea rcx, [0x1400865c2]
mov rsi, rax
call fcn.1400059a9
mov qword [rsp + 0x28], rsi
mov rcx, r15
mov rsi, r12
mov r9d, dword [rsp + 0x5c]
mov r8, qword [rsp + 0x50]
mov dword [rsp + 0x30], 0x1b5
lea rdx, str._s2_c_Use__s_keyboard_with__s_codepage___d__n
mov qword [rsp + 0x20], rax
call sub.msvcrt.dll_fprintf
test r13d, r13d
lea rax, str.MENU_n12__n
mov rdx, r15
lea rcx, str._1__ndevicelocaledisplay.sys_con_ega__1__n_2__n
cmovne rcx, rax
call sub.msvcrt.dll_fputs
mov rcx, r15
call sub.msvcrt.dll_fclose
lea rcx, str.Successfully_wrote_CONFIG.SYS_n
call fcn.1400380b9
mov rcx, r12
call sub.msvcrt.dll_strlen
mov rdi, qword [rsp + 0x48]
lea rcx, [rax + 1]
mov eax, 0x104
cmp rcx, rax
cmova rcx, rax
mov ecx, ecx
rep movsb byte [rdi], byte [rsi]
mov rcx, r12
mov r12d, 0x103
call sub.msvcrt.dll_strlen
mov rcx, qword [rsp + 0x48]
lea rdx, [rax + 1]
cmp rdx, 0x104
cmovae rax, r12
mov byte [rsp + rax + 0x6c], 0
call sub.msvcrt.dll_strlen
mov r8d, 0xe
mov rcx, qword [rsp + 0x48]
lea rdx, str.AUTOEXEC.BAT
sub r12, rax
cmp r12, r8
cmovbe r8, r12
call sub.msvcrt.dll_strncat
mov rcx, qword [rsp + 0x48]
lea rdx, [0x1400868e6]
call sub.msvcrt.dll_fopen
mov r12, rax
test rax, rax
jne 0x140006c51
call fcn.140038579
lea rcx, str.Unable_to_create_AUTOEXEC.BAT:__s._n
mov rdx, rax
jmp 0x140006a9c
mov rdx, rax
lea rcx, str._echo_off_n
call sub.msvcrt.dll_fputs
mov rdx, r12
lea rcx, str.set_PATH.__LOCALE_n
call sub.msvcrt.dll_fputs
test r13d, r13d
je 0x140006c83
mov rdx, r12
lea rcx, str.display_con_ega__1__n
call sub.msvcrt.dll_fputs
lea rdx, str.GOTO___CONFIG___n
mov rcx, r12
call sub.msvcrt.dll_fprintf
mov rdx, r12
lea rcx, [0x140086ad5]
call sub.msvcrt.dll_fputs
mov r9, rbp
mov r8d, ebx
mov rcx, r12
lea rdx, str.mode_con_codepage_prepare___d__locale_s____NUL_n
call sub.msvcrt.dll_fprintf
mov r8d, ebx
lea rdx, str.mode_con_codepage_select_d___NUL_n
mov rcx, r12
call sub.msvcrt.dll_fprintf
movsxd rbp, dword [rsp + 0x58]
mov r8, r14
mov rcx, r12
lea rax, str.keyboard.sys
lea rdx, str.keyb__s__locale_s_n
shl rbp, 4
mov r9, qword [rax + rbp]
call sub.msvcrt.dll_fprintf
lea rcx, [0x140086b44]
mov rdx, r12
call sub.msvcrt.dll_fputs
mov rcx, r12
call sub.msvcrt.dll_fclose
lea rcx, str.Successfully_wrote_AUTOEXEC.BAT_n
call fcn.1400380b9
mov eax, 1
add rsp, 0x178
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret