Function at 0x140002930
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 [0x140106438]
xor rax, rsp
mov qword [rsp + 0x170], rax
mov r13d, edx
mov dword [rsp + 0x44], edx
mov r14, rcx
call fcn.1400020b0
mov r15, rax
mov rcx, rax
test r13d, r13d
je 0x14000297a
call fcn.140001f40
jmp 0x14000297f
call fcn.140001e80
mov dword [rsp + 0x40], eax
mov ebx, eax
test eax, eax
jns 0x1400029d6
mov rdx, r15
lea rcx, str.Keyboard_id__s_is_not_supported___falling_back_to_us
call fcn.140041aa0
lea r15, [0x1400d4a58]
mov rcx, r15
test r13d, r13d
je 0x1400029ae
call fcn.140001f40
jmp 0x1400029b3
call fcn.140001e80
mov dword [rsp + 0x40], eax
mov ebx, eax
test eax, eax
jns 0x1400029d6
mov r8d, 0x3d9
lea rdx, str.C:_src_r3dusb_srcdos_locale.c
lea rcx, str.kbdrv___0
call fcn.1400a15c4
mov rcx, r15
call fcn.140002000
mov r8, rax
lea rcx, str.Will_use_DOS_keyboard__s___s_
mov rdx, r15
call fcn.140041aa0
call qword [sym.imp.KERNEL32.dll_GetOEMCP]
mov edi, eax
cmp eax, 0xfde9
jne 0x140002a25
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, [0x140109fc0]
lea rsi, [0x140000000]
lea rdx, str.ega.cpx
test r13d, r13d
je 0x140002c4e
cmp edi, 0xf05
ja 0x140002b4c
je case.0x140002aaf.668
cmp edi, 0x29b
ja 0x140002a7e
je case.0x140002aaf.668
cmp edi, 0x71
je case.0x140002aaf.669
cmp edi, 0x1b5
jne case.0x140002ba3.30011
mov rsi, rdx
jmp 0x140002c33
cmp edi, 0x3df
ja 0x140002ae1
je case.0x140002aaf.668
lea eax, [rdi - 0x29c]
cmp eax, 0xe7
ja case.0x140002ba3.30011
movzx eax, byte [rsi + rax + 0x3334]
mov ecx, dword [rsi + rax*4 + 0x3300]
add rcx, rsi
jmp rcx
lea rsi, str.ega3.cpx
jmp 0x140002c33
lea rsi, str.ega5.cpx
jmp 0x140002c33
lea rsi, str.ega8.cpx
jmp 0x140002c33
lea rsi, str.ega9.cpx
jmp 0x140002c33
cmp edi, 0x465
ja 0x140002b17
je case.0x140002ba3.30007
mov eax, edi
sub eax, 0x45c
je case.0x140002aaf.672
sub eax, 1
je case.0x140002aaf.672
sub eax, 1
je case.0x140002aaf.672
cmp eax, 1
jne case.0x140002ba3.30011
lea rsi, str.ega2.cpx
jmp 0x140002c33
mov eax, edi
sub eax, 0x46b
je case.0x140002ba3.30007
sub eax, 0x759
je case.0x140002ba3.30007
cmp eax, 9
jne case.0x140002ba3.30011
lea rsi, str.ega16.cpx
jmp 0x140002c33
lea rsi, str.ega10.cpx
jmp 0x140002c33
cmp edi, 0x7530
ja 0x140002b74
je case.0x140002ba3.30001
mov eax, edi
sub eax, 0xf06
je case.0x140002aaf.675
cmp eax, 2
jne case.0x140002ba3.30011
lea rsi, str.ega18.cpx
jmp 0x140002c33
cmp edi, 0xe328
ja 0x140002bde
je case.0x140002ba3.30002
lea eax, [rdi - 0x7531]
cmp eax, 0x27
ja case.0x140002ba3.30011
movzx eax, byte [rsi + rax + 0x3448]
mov ecx, dword [rsi + rax*4 + 0x341c]
add rcx, rsi
jmp rcx
lea rsi, str.ega4.cpx
jmp 0x140002c33
lea rsi, str.ega7.cpx
jmp 0x140002c33
lea rsi, str.ega11.cpx
jmp 0x140002c33
lea rsi, str.ega14.cpx
jmp 0x140002c33
lea rsi, str.ega15.cpx
jmp 0x140002c33
lea rsi, str.ega17.cpx
jmp 0x140002c33
cmp edi, 0xe9b5
ja 0x140002c06
je case.0x140002ba3.30006
mov eax, edi
sub eax, 0xe362
je case.0x140002ba3.30006
sub eax, 0x7d
je case.0x140002ba3.30003
cmp eax, 0x383
jmp 0x140002c1c
lea rsi, str.ega12
jmp 0x140002c33
cmp edi, 0xeb62
je case.0x140002ba3.30006
cmp edi, 0xedb5
je case.0x140002ba3.30006
cmp edi, 0xf362
je case.0x140002ba3.30002
mov rsi, rbp
jmp 0x140002c33
lea rsi, str.ega13.cpx
jmp 0x140002c33
lea rsi, str.ega6.cpx
test rsi, rsi
je 0x140002ca0
cmp edi, 0x352
jne 0x140002d17
mov edi, 0x35a
jmp 0x140002d17
cmp edi, 0x2e1
ja 0x140002c6c
je case.0x140002c89.777
cmp edi, 0x1b5
jne case.0x140002c89.778
lea rsi, str.ega.cpi
jmp 0x140002d17
lea eax, [rdi - 0x307]
cmp eax, 0x5e
ja case.0x140002c89.778
movzx eax, byte [rsi + rax + 0x3480]
mov ecx, dword [rsi + rax*4 + 0x3470]
add rcx, rsi
jmp rcx
lea rsi, str.ega2.cpi
jmp 0x140002d17
lea rsi, str.ega3.cpi
jmp 0x140002d17
lea rsi, [0x140000000]
mov eax, ebp
mov rcx, r12
nop dword [rax]
cmp dword [rcx], edi
je 0x140002cdd
inc eax
add rcx, 0x10
cmp eax, 0x73
jb 0x140002cb0
mov r8d, 0x1b3
lea rdx, str.C:_src_r3dusb_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400a15c4
mov r8, rbp
jmp 0x140002ce7
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.140041aa0
movsxd rax, ebx
add rax, rax
test r13d, r13d
mov edi, dword [rsi + rax*8 + 0x109f88]
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 0x140002d4d
inc eax
add rcx, 0x10
cmp eax, 0x73
jb 0x140002d20
mov r8d, 0x1b3
lea rdx, str.C:_src_r3dusb_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400a15c4
mov r8, rbp
jmp 0x140002d57
cdqe
add rax, rax
mov r8, qword [r12 + rax*8 + 8]
mov edx, edi
lea rcx, str.Will_use_codepage__d___s_
call fcn.140041aa0
cmp edi, 0x1b5
jne 0x140002f08
cmp byte [r15], 0x75
jne 0x140002f08
cmp byte [r15 + 1], 0x73
jne 0x140002f08
cmp byte [r15 + 2], bpl
jne 0x140002f08
test r14, r14
jne 0x140002d9a
mov rax, rbp
jmp 0x140002daa
mov rax, 0xffffffffffffffff
inc rax
cmp byte [r14 + rax], bpl
jne 0x140002da1
inc rax
lea rcx, [rsp + 0x60]
mov ebx, 0x104
mov rdx, r14
cmp rax, rbx
cmovb rbx, rax
mov r8, rbx
call fcn.140093550
mov r9, 0xffffffffffffffff
mov byte [rsp + rbx + 0x5f], bpl
lea r8, str.AUTOEXEC.BAT
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.14009b5bc
lea rdx, [0x1400d57c8]
lea rcx, [rsp + 0x60]
call fcn.14009b898
mov rbx, rax
test rax, rax
jne 0x140002e1f
call fcn.140041e50
mov rdx, rax
lea rcx, str.Unable_to_create_AUTOEXEC.BAT:__s
call fcn.140041aa0
xor eax, eax
jmp 0x1400032c4
lea rdx, str._echo_off_n
mov rcx, rbx
call fcn.140001010
lea rdx, str.set_PATH.__LOCALE_n
mov rcx, rbx
call fcn.140001010
mov eax, ebp
mov rdx, r12
cmp dword [rdx], 0x1b5
je 0x140002e73
inc eax
add rdx, 0x10
cmp eax, 0x73
jb 0x140002e42
mov r8d, 0x1b3
lea rdx, str.C:_src_r3dusb_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400a15c4
mov rdi, rbp
jmp 0x140002e7d
cdqe
add rax, rax
mov rdi, qword [r12 + rax*8 + 8]
mov r10d, 0x75
lea r11, [0x1400d1150]
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 0x140002eb5
cmp r9b, byte [rcx + 1]
jne 0x140002eb5
cmp bpl, byte [rcx + 2]
je 0x140002efb
inc edx
add r8, 0x10
cmp edx, 0x38
jb 0x140002e93
mov r8d, 0x129
lea rdx, str.C:_src_r3dusb_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_kb_hr_list_
call fcn.1400a15c4
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.140001010
jmp 0x1400032ab
movsxd rax, edx
add rax, rax
mov rbp, qword [r11 + rax*8 + 8]
jmp 0x140002ed9
test r14, r14
jne 0x140002f12
mov rax, rbp
jmp 0x140002f29
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [r14 + rax], bpl
jne 0x140002f20
inc rax
lea rcx, [rsp + 0x60]
mov ebx, 0x104
mov rdx, r14
cmp rax, rbx
cmovb rbx, rax
mov r8, rbx
call fcn.140093550
mov r9, 0xffffffffffffffff
mov byte [rsp + rbx + 0x5f], bpl
lea r8, str.CONFIG.SYS
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.14009b5bc
lea rdx, [0x1400d57c8]
lea rcx, [rsp + 0x60]
call fcn.14009b898
mov r12, rax
test rax, rax
jne 0x140002f9e
call fcn.140041e50
mov rdx, rax
lea rcx, str.Unable_to_create_CONFIG.SYS:__s.
call fcn.140041aa0
xor eax, eax
jmp 0x1400032c4
test r13d, r13d
je 0x140002fbb
lea rdx, str._MENUCOLOR7_0_nMENU_nMENU___FreeDOS_Language_Selection_Menu_n
mov rcx, r12
call fcn.140001010
lea rdx, [0x1400d58f0]
jmp 0x140002fc2
lea rdx, str._MENU__n
mov rcx, r12
call fcn.140001010
lea rdx, str.MENUDEFAULT1_5_n
mov rcx, r12
call fcn.140001010
lea rbx, [0x140109fc0]
mov eax, ebp
mov rcx, rbx
cmp dword [rcx], edi
je 0x140003012
inc eax
add rcx, 0x10
cmp eax, 0x73
jb 0x140002fe5
mov r8d, 0x1b3
lea rdx, str.C:_src_r3dusb_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400a15c4
mov rbx, rbp
jmp 0x14000301c
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.140002000
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.140001010
lea rdx, [0x140109fc0]
mov eax, ebp
mov rcx, rdx
cmp dword [rcx], 0x1b5
je 0x1400030b2
inc eax
add rcx, 0x10
cmp eax, 0x73
jb 0x140003081
mov r8d, 0x1b3
lea rdx, str.C:_src_r3dusb_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_cp_hr_list_
call fcn.1400a15c4
mov rbx, rbp
jmp 0x1400030bc
cdqe
add rax, rax
mov rbx, qword [rdx + rax*8 + 8]
mov r10d, 0x75
lea r11, [0x1400d1150]
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 0x1400030f8
cmp r9b, byte [rcx + 1]
jne 0x1400030f8
cmp bpl, byte [rcx + 2]
je 0x1400032ef
inc edx
add r8, 0x10
cmp edx, 0x38
jb 0x1400030d2
mov r8d, 0x129
lea rdx, str.C:_src_r3dusb_srcdos_locale.c
lea rcx, str.i___ARRAYSIZE_kb_hr_list_
call fcn.1400a15c4
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.140001010
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, [0x1400d10a0]
mov rcx, r12
cmovne r8, rax
call fcn.140001010
mov rcx, r12
call fcn.14009b928
lea rcx, str.Successfully_wrote_CONFIG.SYS
call fcn.140041aa0
test r14, r14
je 0x14000319d
mov rax, 0xffffffffffffffff
inc rax
cmp byte [r14 + rax], bpl
jne 0x140003191
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.140093550
mov r9, 0xffffffffffffffff
mov byte [rsp + rbx + 0x5f], 0
lea r8, str.AUTOEXEC.BAT
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.14009b5bc
lea rdx, [0x1400d57c8]
lea rcx, [rsp + 0x60]
call fcn.14009b898
mov rbx, rax
test rax, rax
je 0x140002e04
lea rdx, str._echo_off_n
mov rcx, rax
call fcn.140001010
lea rdx, str.set_PATH.__LOCALE_n
mov rcx, rbx
call fcn.140001010
test r13d, r13d
je 0x14000322e
lea rdx, str.display_con_ega__1__n
mov rcx, rbx
call fcn.140001010
lea rdx, str.GOTO___CONFIG___n
mov rcx, rbx
call fcn.140001010
lea rdx, [0x1400d5a4c]
mov rcx, rbx
call fcn.140001010
mov r9, rsi
lea rdx, str.mode_con_codepage_prepare___d__locale_s____NUL_n
mov r8d, edi
mov rcx, rbx
call fcn.140001010
mov r8d, edi
lea rdx, str.mode_con_codepage_select_d___NUL_n
mov rcx, rbx
call fcn.140001010
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 + 0x109f80]
call fcn.140001010
lea rdx, [0x1400d5ac8]
mov rcx, rbx
call fcn.140001010
mov rcx, rbx
call fcn.14009b928
lea rcx, str.Successfully_wrote_AUTOEXEC.BAT
call fcn.140041aa0
mov eax, 1
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.140092060
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 0x14000311f
push rbx
sub rsp, 0x20
mov rbx, rcx
test rcx, rcx
jne 0x14001ae46
xor eax, eax
add rsp, 0x20
pop rbx
ret
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], rdi
xor edi, edi
cmp byte [rcx], 1
ja 0x14001afcc
mov rax, qword [rcx + 0x18]
lea r8d, [rdi + 4]
test rax, rax
lea rcx, str._NULL_
lea rdx, str.MSG_
cmovne rcx, rax
call fcn.1400a1ff0
mov r11, qword [rbx + 0x18]
test eax, eax
jne 0x14001af4d
test r11, r11
je 0x14001af2e
cmp byte [rbx], 1
jne 0x14001af2e
lea rcx, [r11 + 4]
call fcn.1400a5c58
lea ecx, [rax + 0xbb8]
mov dword [rbx + 4], ecx
cmp ecx, 0xbb8
jne 0x14001aec5
mov r9, qword [rbx + 0x18]
lea rcx, str._s__d_:_failed_to_convert_the_numeric_value_in___n_n
jmp 0x14001b077
lea eax, [rcx - 0xbb9]
cmp eax, 0x18e
ja 0x14001af19
movsxd rax, ecx
mov rcx, qword [0x140111658]
mov rcx, qword [rcx + rax*8 - 0x5dc0]
call fcn.14009b5a0
movsxd rax, dword [rbx + 4]
mov rdx, qword [0x140111658]
mov qword [rdx + rax*8 - 0x5dc0], rdi
movsxd rcx, dword [rbx + 4]
mov rax, qword [rbx + 0x20]
mov qword [rdx + rcx*8 - 0x5dc0], rax
mov rcx, qword [rbx + 0x18]
mov qword [rbx + 0x20], rdi
jmp 0x14001b0d1
lea rcx, str.localization:_invalid_MSG__index_n
call fcn.140041aa0
mov rcx, qword [rbx + 0x18]
jmp 0x14001b0d1
mov r8d, dword [0x14015ae9c]
lea rcx, str._s__d_:_only_the__t_ext_command_can_be_applied_to_a_message__MSG___n_n
mov rdx, qword [0x140111a60]
call fcn.140041aa0
jmp 0x14001b08a
lea rsi, str.IDD_DIALOG
mov r9, rdi
mov r10, rsi
nop word [rax + rax]
mov rax, qword [r10]
lea r8, str._NULL_
test rax, rax
cmovne r8, rax
test r11, r11
lea rax, str._NULL_
cmovne rax, r11
sub r8, rax
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x14001af95
inc rax
test ecx, ecx
jne 0x14001af82
test edx, edx
je 0x14001afae
inc r9
add r10, 0x10
cmp r9, 0x21d
jb 0x14001af60
mov eax, dword [rbx + 4]
jmp 0x14001afb9
add r9, r9
mov eax, dword [rsi + r9*8 + 8]
mov dword [rbx + 4], eax
test eax, eax
jns 0x14001afcc
mov r9, r11
lea rcx, str._s__d_:_unknown_control__s_n_n
jmp 0x14001b077
lea rax, [0x140109110]
cmp qword [0x140111658], rax
je 0x14001af25
movzx ecx, byte [rbx]
test ecx, ecx
je 0x14001b05e
sub ecx, 1
je 0x14001b051
cmp ecx, 3
mov rcx, qword [rbx + 0x18]
jne 0x14001b0d1
xor edx, edx
call fcn.14001ba50
mov r9, qword [rbx + 0x18]
mov rsi, rax
test rax, rax
je 0x14001b02e
mov rdx, r9
lea rcx, str.localization:_using_locale_base__s_n
call fcn.140041aa0
mov rdx, rsi
xor ecx, ecx
call fcn.1400207b0
mov rcx, qword [rbx + 0x18]
jmp 0x14001b0d1
mov r8d, dword [0x14015ae9c]
lea rcx, str._s__d_:_locale_base__s_not_found___ignoring_n
mov rdx, qword [0x140111a60]
call fcn.140041aa0
mov rcx, qword [rbx + 0x18]
jmp 0x14001b0d1
mov rdx, rbx
call fcn.14001a710
jmp 0x14001b0fc
mov eax, dword [rbx + 4]
mov rcx, qword [rbx + 0x18]
add eax, 0xffffff9b
cmp eax, 0xa
jbe 0x14001b0cb
mov r9, rcx
lea rcx, str._s__d_:__s_is_not_a_group_ID_n_n
mov r8d, dword [0x14015ae9c]
mov rdx, qword [0x140111a60]
call fcn.140041aa0
mov rcx, qword [rbx + 0x18]
call fcn.14009b5a0
mov rcx, qword [rbx + 0x20]
mov qword [rbx + 0x18], rdi
call fcn.14009b5a0
mov qword [rbx + 0x20], rdi
mov rcx, qword [rbx + 0x10]
call fcn.14009b5a0
mov rcx, rbx
mov qword [rbx + 0x10], rdi
call fcn.14009b5a0
mov rsi, qword [rsp + 0x30]
xor eax, eax
mov rdi, qword [rsp + 0x38]
add rsp, 0x20
pop rbx
ret
mov dword [0x140153364], eax
call fcn.14009b5a0
mov rcx, qword [rbx + 0x20]
mov qword [rbx + 0x18], rdi
call fcn.14009b5a0
mov qword [rbx + 0x20], rdi
mov rcx, qword [rbx + 0x10]
call fcn.14009b5a0
mov rcx, rbx
mov qword [rbx + 0x10], rdi
call fcn.14009b5a0
mov rsi, qword [rsp + 0x30]
mov eax, 1
mov rdi, qword [rsp + 0x38]
add rsp, 0x20
pop rbx
ret
add esp, 0x20
pop rbx
jmp 0x14001ae30