Function at 0x140004360
Capabilities:
Get geographical location
Identify system language via api

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x180
mov rax, qword [0x140193440]
xor rax, rsp
mov qword [rsp + 0x170], rax
mov r13d, edx
mov dword [rsp + 0x44], edx
mov r14, rcx
call fcn.1400036c0
mov r15, rax
mov rcx, rax
test r13d, r13d
je 0x1400043a6
call fcn.140003500
jmp 0x1400043ab
call fcn.140003440
mov dword [rsp + 0x40], eax
mov r12d, eax
test eax, eax
jns 0x140004404
mov rdx, r15
lea rcx, str.Keyboard_id__s_is_not_supported___falling_back_to_us
call fcn.14004f2f0
lea r15, [0x14015380c]
mov rcx, r15
test r13d, r13d
je 0x1400043db
call fcn.140003500
jmp 0x1400043e0
call fcn.140003440
mov dword [rsp + 0x40], eax
mov r12d, eax
test eax, eax
jns 0x140004404
mov r8d, 0x3d9
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.kbdrv___0
call fcn.1400fbe54
mov rcx, r15
call fcn.1400035c0
mov r8, rax
lea rcx, str.Will_use_DOS_keyboard__s___s_
mov rdx, r15
call fcn.14004f2f0
call qword [sym.imp.KERNEL32.dll_GetOEMCP]
mov edi, eax
cmp eax, 0xfde9
jne 0x140004453
call qword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx ecx, ax
mov r9d, 4
lea r8, [rsp + 0x48]
mov edx, 0x2000000b
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
cmovne edi, dword [rsp + 0x48]
xor ebp, ebp
mov qword [rsp + 0x1d0], rbx
lea rdx, str.ega.cpx
lea rbx, [0x140000000]
test r13d, r13d
je 0x1400046c3
cmp edi, 0xf05
ja 0x1400045c3
je case.0x140004521.668
cmp edi, 0x29b
ja 0x1400044f4
je case.0x140004521.668
cmp edi, 0x71
je case.0x140004521.669
cmp edi, 0x1b5
je case.0x140004521.674
mov rsi, rbp
lea rdx, [0x140197040]
test rsi, rsi
jne 0x140004763
mov eax, ebp
mov rcx, rdx
nop dword [rax]
cmp dword [rcx], edi
je 0x140004720
inc eax
add rcx, 0x10
cmp eax, 0x73
jb 0x1400044c0
mov r8d, 0x1b3
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400fbe54
mov r8, rbp
jmp 0x14000472a
cmp edi, 0x3df
ja 0x140004558
je case.0x140004521.668
lea eax, [rdi - 0x29c]
cmp eax, 0xe7
ja case.0x140004706.778
movzx eax, byte [rbx + rax + 0x4db4]
mov ecx, dword [rbx + rax*4 + 0x4d80]
add rcx, rbx
jmp rcx
mov rsi, rdx
jmp 0x1400044a8
lea rsi, str.ega3.cpx
jmp 0x1400044a8
lea rsi, str.ega5.cpx
jmp 0x1400044a8
lea rsi, str.ega8.cpx
jmp 0x1400044a8
lea rsi, str.ega9.cpx
jmp 0x1400044a8
cmp edi, 0x465
ja 0x14000458e
je case.0x14000461a.30007
mov eax, edi
sub eax, 0x45c
je case.0x140004521.672
sub eax, 1
je case.0x140004521.672
sub eax, 1
je case.0x140004521.672
cmp eax, 1
jne case.0x140004706.778
lea rsi, str.ega2.cpx
jmp 0x1400044a8
mov eax, edi
sub eax, 0x46b
je case.0x14000461a.30007
sub eax, 0x759
je case.0x14000461a.30007
cmp eax, 9
jne case.0x140004706.778
lea rsi, str.ega16.cpx
jmp 0x1400044a8
lea rsi, str.ega10.cpx
jmp 0x1400044a8
cmp edi, 0x7530
ja 0x1400045eb
je case.0x14000461a.30001
mov eax, edi
sub eax, 0xf06
je case.0x140004521.675
cmp eax, 2
jne case.0x140004706.778
lea rsi, str.ega18.cpx
jmp 0x1400044a8
cmp edi, 0xe328
ja 0x140004664
je case.0x14000461a.30002
lea eax, [rdi - 0x7531]
cmp eax, 0x27
ja case.0x140004706.778
movzx eax, byte [rbx + rax + 0x4ec8]
mov ecx, dword [rbx + rax*4 + 0x4e9c]
add rcx, rbx
jmp rcx
lea rsi, str.ega4.cpx
jmp 0x1400044a8
lea rsi, str.ega7.cpx
jmp 0x1400044a8
lea rsi, str.ega11.cpx
jmp 0x1400044a8
lea rsi, str.ega14.cpx
jmp 0x1400044a8
lea rsi, str.ega15.cpx
jmp 0x1400044a8
lea rsi, str.ega17.cpx
jmp 0x1400044a8
cmp edi, 0xe9b5
ja 0x14000468f
je case.0x14000461a.30006
mov eax, edi
sub eax, 0xe362
je case.0x14000461a.30006
sub eax, 0x7d
je case.0x14000461a.30003
cmp eax, 0x383
jmp 0x1400046a5
lea rsi, str.ega12
jmp 0x1400044a8
cmp edi, 0xeb62
je case.0x14000461a.30006
cmp edi, 0xedb5
je case.0x14000461a.30006
cmp edi, 0xf362
jne case.0x140004706.778
lea rsi, str.ega13.cpx
jmp 0x1400044a8
lea rsi, str.ega6.cpx
jmp 0x1400044a8
cmp edi, 0x2e1
ja 0x1400046e5
je case.0x140004706.777
cmp edi, 0x1b5
jne case.0x140004706.778
lea rsi, str.ega.cpi
jmp 0x1400044a8
lea eax, [rdi - 0x307]
cmp eax, 0x5e
ja case.0x140004706.778
movzx eax, byte [rbx + rax + 0x4f00]
mov ecx, dword [rbx + rax*4 + 0x4ef0]
add rcx, rbx
jmp rcx
lea rsi, str.ega2.cpi
jmp 0x1400044a8
lea rsi, str.ega3.cpi
jmp 0x1400044a8
cdqe
add rax, rax
mov r8, qword [rdx + rax*8 + 8]
mov edx, edi
lea rcx, str.Unable_to_find_an_EGA_file_with_codepage__d___s_
call fcn.14004f2f0
movsxd rax, r12d
lea rsi, str.ega.cpi
add rax, rax
lea rdx, [0x140197040]
test r13d, r13d
mov edi, dword [rbx + rax*8 + 0x197008]
lea rax, str.ega.cpx
cmovne rsi, rax
jmp 0x140004778
test r13d, r13d
je 0x140004778
cmp edi, 0x352
mov eax, 0x35a
cmovne eax, edi
mov edi, eax
mov eax, ebp
mov rcx, rdx
nop dword [rax]
cmp dword [rcx], edi
je 0x1400047ad
inc eax
add rcx, 0x10
cmp eax, 0x73
jb 0x140004780
mov r8d, 0x1b3
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400fbe54
mov r8, rbp
jmp 0x1400047b7
cdqe
add rax, rax
mov r8, qword [rdx + rax*8 + 8]
mov edx, edi
lea rcx, str.Will_use_codepage__d___s_
call fcn.14004f2f0
cmp edi, 0x1b5
jne 0x140004978
cmp byte [r15], 0x75
jne 0x140004978
cmp byte [r15 + 1], 0x73
jne 0x140004978
cmp byte [r15 + 2], 0
jne 0x140004978
test r14, r14
jne 0x1400047fb
mov rax, rbp
jmp 0x14000480c
mov rax, 0xffffffffffffffff
inc rax
cmp byte [r14 + rax], 0
jne 0x140004802
inc rax
lea rcx, [rsp + 0x60]
mov ebx, 0x104
mov rdx, r14
cmp rax, rbx
cmovb rbx, rax
mov r8, rbx
call fcn.140135ea0
mov r9, 0xffffffffffffffff
mov byte [rsp + rbx + 0x5f], 0
lea r8, str.AUTOEXEC.BAT
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.1400e8d6c
lea rdx, [0x140154580]
lea rcx, [rsp + 0x60]
call fcn.1400e9100
mov rbx, rax
test rax, rax
jne 0x140004881
call fcn.14004fba0
mov rdx, rax
lea rcx, str.Unable_to_create_AUTOEXEC.BAT:__s
call fcn.14004f2f0
xor eax, eax
jmp 0x140004d44
lea rdx, str._echo_off_n
mov rcx, rbx
call fcn.140001060
lea rdx, str.set_PATH.__LOCALE_n
mov rcx, rbx
call fcn.140001060
lea rcx, [0x140197040]
mov eax, ebp
mov rdx, rcx
nop dword [rax + rax]
cmp dword [rdx], 0x1b5
je 0x1400048e1
inc eax
add rdx, 0x10
cmp eax, 0x73
jb 0x1400048b0
mov r8d, 0x1b3
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400fbe54
mov rdi, rbp
jmp 0x1400048eb
cdqe
add rax, rax
mov rdi, qword [rcx + rax*8 + 8]
lea r11, [0x14014fad0]
mov edx, ebp
mov r8, r11
mov r10d, 0x75
mov r9d, 0x73
mov rax, qword [r8]
lea rcx, str._NULL_
test rax, rax
cmovne rcx, rax
cmp r10b, byte [rcx]
jne 0x140004925
cmp r9b, byte [rcx + 1]
jne 0x140004925
cmp bpl, byte [rcx + 2]
je 0x14000496b
inc edx
add r8, 0x10
cmp edx, 0x38
jb 0x140004903
mov r8d, 0x129
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_kb_hr_list_
call fcn.1400fbe54
mov r9, rdi
mov dword [rsp + 0x20], 0x1b5
mov r8, rbp
lea rdx, str.echo_Using__s_keyboard_with__s_codepage___d__n
mov rcx, rbx
call fcn.140001060
jmp 0x140004d2b
movsxd rax, edx
add rax, rax
mov rbp, qword [r11 + rax*8 + 8]
jmp 0x140004949
test r14, r14
jne 0x140004982
mov rax, rbp
jmp 0x14000499a
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [r14 + rax], 0
jne 0x140004990
inc rax
lea rcx, [rsp + 0x60]
mov ebx, 0x104
mov rdx, r14
cmp rax, rbx
cmovb rbx, rax
mov r8, rbx
call fcn.140135ea0
mov r9, 0xffffffffffffffff
mov byte [rsp + rbx + 0x5f], 0
lea r8, str.CONFIG.SYS
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.1400e8d6c
lea rdx, [0x140154580]
lea rcx, [rsp + 0x60]
call fcn.1400e9100
mov r12, rax
test rax, rax
jne 0x140004a0f
call fcn.14004fba0
mov rdx, rax
lea rcx, str.Unable_to_create_CONFIG.SYS:__s.
call fcn.14004f2f0
xor eax, eax
jmp 0x140004d44
test r13d, r13d
je 0x140004a2c
lea rdx, str._MENUCOLOR7_0_nMENU_nMENU___FreeDOS_Language_Selection_Menu_n
mov rcx, r12
call fcn.140001060
lea rdx, [0x1401546a8]
jmp 0x140004a33
lea rdx, str._MENU__n
mov rcx, r12
call fcn.140001060
lea rdx, str.MENUDEFAULT1_5_n
mov rcx, r12
call fcn.140001060
lea rbx, [0x140197040]
mov eax, ebp
mov rcx, rbx
cmp dword [rcx], edi
je 0x140004a83
inc eax
add rcx, 0x10
cmp eax, 0x73
jb 0x140004a56
mov r8d, 0x1b3
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400fbe54
mov rbx, rbp
jmp 0x140004a8d
cdqe
add rax, rax
mov rbx, qword [rbx + rax*8 + 8]
mov ecx, dword [rsp + 0x44]
lea rdx, str.MENU
test ecx, ecx
mov eax, 0x29
mov r13d, 0x2c
mov rcx, r15
cmovne r13d, eax
lea rax, str.MENUITEM
cmovne rax, rdx
mov qword [rsp + 0x50], rax
call fcn.1400035c0
mov r8, qword [rsp + 0x50]
lea rdx, str._s1_c_Use__s_keyboard_with__s_codepage___d__n
mov dword [rsp + 0x30], edi
mov r9d, r13d
mov qword [rsp + 0x28], rbx
mov rcx, r12
mov qword [rsp + 0x20], rax
call fcn.140001060
lea rdx, [0x140197040]
mov eax, ebp
mov rcx, rdx
cmp dword [rcx], 0x1b5
je 0x140004b23
inc eax
add rcx, 0x10
cmp eax, 0x73
jb 0x140004af2
mov r8d, 0x1b3
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400fbe54
mov rbx, rbp
jmp 0x140004b2d
cdqe
add rax, rax
mov rbx, qword [rdx + rax*8 + 8]
lea r11, [0x14014fad0]
mov edx, ebp
mov r8, r11
mov r10d, 0x75
mov r9d, 0x73
nop word [rax + rax]
mov rax, qword [r8]
lea rcx, str._NULL_
test rax, rax
cmovne rcx, rax
cmp r10b, byte [rcx]
jne 0x140004b76
cmp r9b, byte [rcx + 1]
jne 0x140004b76
cmp bpl, byte [rcx + 2]
je 0x140004d6f
inc edx
add r8, 0x10
cmp edx, 0x38
jb 0x140004b50
mov r8d, 0x129
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_kb_hr_list_
call fcn.1400fbe54
mov rcx, rbp
mov r8, qword [rsp + 0x50]
lea rdx, str._s2_c_Use__s_keyboard_with__s_codepage___d__n
mov dword [rsp + 0x30], 0x1b5
mov r9d, r13d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rcx
mov rcx, r12
call fcn.140001060
mov r13d, dword [rsp + 0x44]
lea rax, str.MENU_n12__n
test r13d, r13d
lea r8, str._1__ndevicelocaledisplay.sys_con_ega__1__n_2__n
lea rdx, [0x14014fa20]
mov rcx, r12
cmovne r8, rax
call fcn.140001060
mov rcx, r12
call fcn.1400e9320
lea rcx, str.Successfully_wrote_CONFIG.SYS
call fcn.14004f2f0
test r14, r14
je 0x140004c1d
mov rax, 0xffffffffffffffff
nop
inc rax
cmp byte [r14 + rax], 0
jne 0x140004c10
mov rbp, rax
lea rax, [rbp + 1]
mov ebx, 0x104
cmp rax, rbx
lea rcx, [rsp + 0x60]
mov rdx, r14
cmovb rbx, rax
mov r8, rbx
call fcn.140135ea0
mov r9, 0xffffffffffffffff
mov byte [rsp + rbx + 0x5f], 0
lea r8, str.AUTOEXEC.BAT
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.1400e8d6c
lea rdx, [0x140154580]
lea rcx, [rsp + 0x60]
call fcn.1400e9100
mov rbx, rax
test rax, rax
je 0x140004866
lea rdx, str._echo_off_n
mov rcx, rax
call fcn.140001060
lea rdx, str.set_PATH.__LOCALE_n
mov rcx, rbx
call fcn.140001060
test r13d, r13d
je 0x140004cae
lea rdx, str.display_con_ega__1__n
mov rcx, rbx
call fcn.140001060
lea rdx, str.GOTO___CONFIG___n
mov rcx, rbx
call fcn.140001060
lea rdx, [0x140154804]
mov rcx, rbx
call fcn.140001060
mov r9, rsi
lea rdx, str.mode_con_codepage_prepare___d__locale_s____NUL_n
mov r8d, edi
mov rcx, rbx
call fcn.140001060
mov r8d, edi
lea rdx, str.mode_con_codepage_select_d___NUL_n
mov rcx, rbx
call fcn.140001060
movsxd r9, dword [rsp + 0x40]
lea rax, [0x140000000]
add r9, r9
lea rdx, str.keyb__s__locale_s_n
mov r8, r15
mov rcx, rbx
mov r9, qword [rax + r9*8 + 0x197000]
call fcn.140001060
lea rdx, [0x140154880]
mov rcx, rbx
call fcn.140001060
mov rcx, rbx
call fcn.1400e9320
lea rcx, str.Successfully_wrote_AUTOEXEC.BAT
call fcn.14004f2f0
mov eax, 1
mov rbx, qword [rsp + 0x1d0]
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.1400b2a30
add rsp, 0x180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
movsxd rax, edx
add rax, rax
mov rcx, qword [r11 + rax*8 + 8]
jmp 0x140004b9d
mov rcx, qword [rbx + rsi + 0x1954f0]
call fcn.1400e8c70
mov qword [rbx + rsi + 0x1954f0], rdi
xor esi, eax
push rsp
sbb dword [rax], eax
xor esi, eax
push rsp
sbb dword [rax], eax
add rbx, 8
cmp rbx, 0xc80
jb 0x1400200f0
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret