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

Disassembly:
mov qword [rsp + 0x18], rbx
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.1400030a0
mov r15, rax
mov rcx, rax
test r13d, r13d
je 0x140003d8a
call fcn.140002ee0
jmp 0x140003d8f
call fcn.140002e20
mov dword [rsp + 0x40], eax
mov ebx, eax
test eax, eax
jns 0x140003de6
mov rdx, r15
lea rcx, str.Keyboard_id__s_is_not_supported___falling_back_to_us
call fcn.14004f910
lea r15, [0x14015378c]
mov rcx, r15
test r13d, r13d
je 0x140003dbe
call fcn.140002ee0
jmp 0x140003dc3
call fcn.140002e20
mov dword [rsp + 0x40], eax
mov ebx, eax
test eax, eax
jns 0x140003de6
mov r8d, 0x3d9
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.kbdrv___0
call fcn.1400fc264
mov rcx, r15
call fcn.140002fa0
mov r8, rax
lea rcx, str.Will_use_DOS_keyboard__s___s_
mov rdx, r15
call fcn.14004f910
call qword [sym.imp.KERNEL32.dll_GetOEMCP]
mov edi, eax
cmp eax, 0xfde9
jne 0x140003e35
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
lea r12, [0x140197040]
lea rsi, [0x140000000]
lea rdx, str.ega.cpx
test r13d, r13d
je 0x14000405e
cmp edi, 0xf05
ja 0x140003f5c
je case.0x140003ebf.668
cmp edi, 0x29b
ja 0x140003e8e
je case.0x140003ebf.668
cmp edi, 0x71
je case.0x140003ebf.669
cmp edi, 0x1b5
jne case.0x140003fb3.30011
mov rsi, rdx
jmp 0x140004043
cmp edi, 0x3df
ja 0x140003ef1
je case.0x140003ebf.668
lea eax, [rdi - 0x29c]
cmp eax, 0xe7
ja case.0x140003fb3.30011
movzx eax, byte [rsi + rax + 0x4744]
mov ecx, dword [rsi + rax*4 + 0x4710]
add rcx, rsi
jmp rcx
lea rsi, str.ega3.cpx
jmp 0x140004043
lea rsi, str.ega5.cpx
jmp 0x140004043
lea rsi, str.ega8.cpx
jmp 0x140004043
lea rsi, str.ega9.cpx
jmp 0x140004043
cmp edi, 0x465
ja 0x140003f27
je case.0x140003fb3.30007
mov eax, edi
sub eax, 0x45c
je case.0x140003ebf.672
sub eax, 1
je case.0x140003ebf.672
sub eax, 1
je case.0x140003ebf.672
cmp eax, 1
jne case.0x140003fb3.30011
lea rsi, str.ega2.cpx
jmp 0x140004043
mov eax, edi
sub eax, 0x46b
je case.0x140003fb3.30007
sub eax, 0x759
je case.0x140003fb3.30007
cmp eax, 9
jne case.0x140003fb3.30011
lea rsi, str.ega16.cpx
jmp 0x140004043
lea rsi, str.ega10.cpx
jmp 0x140004043
cmp edi, 0x7530
ja 0x140003f84
je case.0x140003fb3.30001
mov eax, edi
sub eax, 0xf06
je case.0x140003ebf.675
cmp eax, 2
jne case.0x140003fb3.30011
lea rsi, str.ega18.cpx
jmp 0x140004043
cmp edi, 0xe328
ja 0x140003fee
je case.0x140003fb3.30002
lea eax, [rdi - 0x7531]
cmp eax, 0x27
ja case.0x140003fb3.30011
movzx eax, byte [rsi + rax + 0x4858]
mov ecx, dword [rsi + rax*4 + 0x482c]
add rcx, rsi
jmp rcx
lea rsi, str.ega4.cpx
jmp 0x140004043
lea rsi, str.ega7.cpx
jmp 0x140004043
lea rsi, str.ega11.cpx
jmp 0x140004043
lea rsi, str.ega14.cpx
jmp 0x140004043
lea rsi, str.ega15.cpx
jmp 0x140004043
lea rsi, str.ega17.cpx
jmp 0x140004043
cmp edi, 0xe9b5
ja 0x140004016
je case.0x140003fb3.30006
mov eax, edi
sub eax, 0xe362
je case.0x140003fb3.30006
sub eax, 0x7d
je case.0x140003fb3.30003
cmp eax, 0x383
jmp 0x14000402c
lea rsi, str.ega12
jmp 0x140004043
cmp edi, 0xeb62
je case.0x140003fb3.30006
cmp edi, 0xedb5
je case.0x140003fb3.30006
cmp edi, 0xf362
je case.0x140003fb3.30002
mov rsi, rbp
jmp 0x140004043
lea rsi, str.ega13.cpx
jmp 0x140004043
lea rsi, str.ega6.cpx
test rsi, rsi
je 0x1400040b0
cmp edi, 0x352
jne 0x140004127
mov edi, 0x35a
jmp 0x140004127
cmp edi, 0x2e1
ja 0x14000407c
je case.0x140004099.777
cmp edi, 0x1b5
jne case.0x140004099.778
lea rsi, str.ega.cpi
jmp 0x140004127
lea eax, [rdi - 0x307]
cmp eax, 0x5e
ja case.0x140004099.778
movzx eax, byte [rsi + rax + 0x4890]
mov ecx, dword [rsi + rax*4 + 0x4880]
add rcx, rsi
jmp rcx
lea rsi, str.ega2.cpi
jmp 0x140004127
lea rsi, str.ega3.cpi
jmp 0x140004127
lea rsi, [0x140000000]
mov eax, ebp
mov rcx, r12
nop dword [rax]
cmp dword [rcx], edi
je 0x1400040ed
inc eax
add rcx, 0x10
cmp eax, 0x73
jb 0x1400040c0
mov r8d, 0x1b3
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400fc264
mov r8, rbp
jmp 0x1400040f7
cdqe
add rax, rax
mov r8, qword [r12 + rax*8 + 8]
mov edx, edi
lea rcx, str.Unable_to_find_an_EGA_file_with_codepage__d___s_
call fcn.14004f910
movsxd rax, ebx
add rax, rax
test r13d, r13d
mov edi, dword [rsi + rax*8 + 0x197008]
lea rsi, str.ega.cpi
lea rax, str.ega.cpx
cmovne rsi, rax
mov eax, ebp
mov rcx, r12
nop dword [rax]
cmp dword [rcx], edi
je 0x14000415d
inc eax
add rcx, 0x10
cmp eax, 0x73
jb 0x140004130
mov r8d, 0x1b3
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400fc264
mov r8, rbp
jmp 0x140004167
cdqe
add rax, rax
mov r8, qword [r12 + rax*8 + 8]
mov edx, edi
lea rcx, str.Will_use_codepage__d___s_
call fcn.14004f910
cmp edi, 0x1b5
jne 0x140004318
cmp byte [r15], 0x75
jne 0x140004318
cmp byte [r15 + 1], 0x73
jne 0x140004318
cmp byte [r15 + 2], bpl
jne 0x140004318
test r14, r14
jne 0x1400041aa
mov rax, rbp
jmp 0x1400041ba
mov rax, 0xffffffffffffffff
inc rax
cmp byte [r14 + rax], bpl
jne 0x1400041b1
inc rax
lea rcx, [rsp + 0x60]
mov ebx, 0x104
mov rdx, r14
cmp rax, rbx
cmovb rbx, rax
mov r8, rbx
call fcn.1401362c0
mov r9, 0xffffffffffffffff
mov byte [rsp + rbx + 0x5f], bpl
lea r8, str.AUTOEXEC.BAT
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.1400e917c
lea rdx, [0x140154500]
lea rcx, [rsp + 0x60]
call fcn.1400e9510
mov rbx, rax
test rax, rax
jne 0x14000422f
call fcn.140050120
mov rdx, rax
lea rcx, str.Unable_to_create_AUTOEXEC.BAT:__s
call fcn.14004f910
xor eax, eax
jmp 0x1400046d4
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
mov eax, ebp
mov rdx, r12
cmp dword [rdx], 0x1b5
je 0x140004283
inc eax
add rdx, 0x10
cmp eax, 0x73
jb 0x140004252
mov r8d, 0x1b3
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400fc264
mov rdi, rbp
jmp 0x14000428d
cdqe
add rax, rax
mov rdi, qword [r12 + rax*8 + 8]
mov r10d, 0x75
lea r11, [0x14014faa0]
mov edx, ebp
mov r8, r11
lea r9d, [r10 - 2]
mov rax, qword [r8]
lea rcx, str._NULL_
test rax, rax
cmovne rcx, rax
cmp r10b, byte [rcx]
jne 0x1400042c5
cmp r9b, byte [rcx + 1]
jne 0x1400042c5
cmp bpl, byte [rcx + 2]
je 0x14000430b
inc edx
add r8, 0x10
cmp edx, 0x38
jb 0x1400042a3
mov r8d, 0x129
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_kb_hr_list_
call fcn.1400fc264
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 0x1400046bb
movsxd rax, edx
add rax, rax
mov rbp, qword [r11 + rax*8 + 8]
jmp 0x1400042e9
test r14, r14
jne 0x140004322
mov rax, rbp
jmp 0x140004339
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [r14 + rax], bpl
jne 0x140004330
inc rax
lea rcx, [rsp + 0x60]
mov ebx, 0x104
mov rdx, r14
cmp rax, rbx
cmovb rbx, rax
mov r8, rbx
call fcn.1401362c0
mov r9, 0xffffffffffffffff
mov byte [rsp + rbx + 0x5f], bpl
lea r8, str.CONFIG.SYS
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.1400e917c
lea rdx, [0x140154500]
lea rcx, [rsp + 0x60]
call fcn.1400e9510
mov r12, rax
test rax, rax
jne 0x1400043ae
call fcn.140050120
mov rdx, rax
lea rcx, str.Unable_to_create_CONFIG.SYS:__s.
call fcn.14004f910
xor eax, eax
jmp 0x1400046d4
test r13d, r13d
je 0x1400043cb
lea rdx, str._MENUCOLOR7_0_nMENU_nMENU___FreeDOS_Language_Selection_Menu_n
mov rcx, r12
call fcn.140001060
lea rdx, [0x140154628]
jmp 0x1400043d2
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 0x140004422
inc eax
add rcx, 0x10
cmp eax, 0x73
jb 0x1400043f5
mov r8d, 0x1b3
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400fc264
mov rbx, rbp
jmp 0x14000442c
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.140002fa0
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 0x1400044c2
inc eax
add rcx, 0x10
cmp eax, 0x73
jb 0x140004491
mov r8d, 0x1b3
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400fc264
mov rbx, rbp
jmp 0x1400044cc
cdqe
add rax, rax
mov rbx, qword [rdx + rax*8 + 8]
mov r10d, 0x75
lea r11, [0x14014faa0]
mov edx, ebp
mov r8, r11
lea r9d, [r10 - 2]
mov rax, qword [r8]
lea rcx, str._NULL_
test rax, rax
cmovne rcx, rax
cmp r10b, byte [rcx]
jne 0x140004508
cmp r9b, byte [rcx + 1]
jne 0x140004508
cmp bpl, byte [rcx + 2]
je 0x1400046ff
inc edx
add r8, 0x10
cmp edx, 0x38
jb 0x1400044e2
mov r8d, 0x129
lea rdx, str.D:_a_rufus_rufus_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_kb_hr_list_
call fcn.1400fc264
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, [0x14014f9f0]
mov rcx, r12
cmovne r8, rax
call fcn.140001060
mov rcx, r12
call fcn.1400e9730
lea rcx, str.Successfully_wrote_CONFIG.SYS
call fcn.14004f910
test r14, r14
je 0x1400045ad
mov rax, 0xffffffffffffffff
inc rax
cmp byte [r14 + rax], bpl
jne 0x1400045a1
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.1401362c0
mov r9, 0xffffffffffffffff
mov byte [rsp + rbx + 0x5f], 0
lea r8, str.AUTOEXEC.BAT
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.1400e917c
lea rdx, [0x140154500]
lea rcx, [rsp + 0x60]
call fcn.1400e9510
mov rbx, rax
test rax, rax
je 0x140004214
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 0x14000463e
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, [0x140154784]
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, [0x140154800]
mov rcx, rbx
call fcn.140001060
mov rcx, rbx
call fcn.1400e9730
lea rcx, str.Successfully_wrote_AUTOEXEC.BAT
call fcn.14004f910
mov eax, 1
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.1400b1f80
mov rbx, qword [rsp + 0x1d0]
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 0x14000452f
call fcn.14001fd50
test ebx, ebx
jne 0x140020159
mov ebx, 8
lea rsi, [0x140000000]
nop word [rax + rax]
mov rcx, qword [rbx + rsi + 0x1954f0]
call fcn.1400e9080
mov rcx, qword [rbx + rsi + 0x196170]
mov qword [rbx + rsi + 0x1954f0], rdi
call fcn.1400e9080
mov qword [rbx + rsi + 0x196170], rdi
add rbx, 8
cmp rbx, 0xc80
jb 0x140020120
jmp 0x140020192
mov ebx, 8
lea rsi, [0x140000000]
nop word [rax + rax]
mov rcx, qword [rbx + rsi + 0x1954f0]
call fcn.1400e9080
mov qword [rbx + rsi + 0x1954f0], rdi
add rbx, 8
cmp rbx, 0xc80
jb 0x140020170
mov rcx, qword [0x1401d0df8]
test rcx, rcx
je 0x140020204
mov r8d, dword [0x1401d0e00]
mov rsi, rdi
lea eax, [r8 + 1]
test eax, eax
je 0x1400201ed
mov rbx, rdi
cmp dword [rbx + rcx], 0
je 0x1400201dd
mov rcx, qword [rbx + rcx + 8]
call fcn.1400e9080
mov rax, qword [0x1401d0df8]
mov qword [rbx + rax + 8], rdi
mov r8d, dword [0x1401d0e00]
mov rcx, qword [0x1401d0df8]
inc rsi
lea edx, [r8 + 1]
add rbx, 0x18
cmp rsi, rdx
jb 0x1400201b3
mov qword [0x1401d0e00], 0
call fcn.1400e9080
mov qword [0x1401d0df8], rdi
mov rsi, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
add rsp, 0x20
pop rbx
ret