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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x5512ec]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, edx
push edi
mov dword [ebp - 0x118], esi
mov edi, ecx
call fcn.00403680
mov dword [ebp - 0x124], eax
mov ebx, eax
mov ecx, ebx
test esi, esi
je 0x40451a
call fcn.00403520
jmp 0x40451f
call fcn.00403480
mov dword [ebp - 0x120], eax
test eax, eax
jns 0x404575
push ebx
push str.Keyboard_id__s_is_not_supported___falling_back_to_us_n
call fcn.0044b0b0
mov ebx, 0x5283f0
add esp, 8
mov dword [ebp - 0x124], ebx
mov ecx, ebx
test esi, esi
je 0x40454f
call fcn.00403520
jmp 0x404554
call fcn.00403480
mov dword [ebp - 0x120], eax
test eax, eax
jns 0x404575
push 0x3d9
push str.D:_a_rufus_rufus_srcdos_locale.c
push str.kbdrv___0
call fcn.004dfbbc
add esp, 0xc
mov ecx, ebx
call fcn.004035c0
push eax
push ebx
push str.Will_use_DOS_keyboard__s___s__n
call fcn.0044b0b0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetOEMCP]
mov esi, eax
cmp esi, 0xfde9
jne 0x4045c2
push 4
lea eax, [ebp - 0x12c]
push eax
push 0x2000000b
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx ecx, ax
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
cmovne esi, dword [ebp - 0x12c]
cmp dword [ebp - 0x118], 0
je 0x404799
cmp esi, 0xf05
ja 0x4046ba
je case.0x404630.668
cmp esi, 0x29b
ja 0x40460a
je case.0x404630.668
cmp esi, 0x71
je case.0x404630.737
cmp esi, 0x1b5
jne case.0x404700.30035
mov ebx, str.ega.cpx
jmp 0x40477f
cmp esi, 0x3df
ja 0x40465f
je case.0x404630.668
lea eax, [esi - 0x29c]
cmp eax, 0xe7
ja case.0x404700.30035
movzx eax, byte [eax + 0x404eb0]
jmp dword [eax*4 + 0x404e7c]
mov ebx, str.ega3.cpx
jmp 0x40477f
mov ebx, str.ega5.cpx
jmp 0x40477f
mov ebx, str.ega8.cpx
jmp 0x40477f
mov ebx, str.ega9.cpx
jmp 0x40477f
cmp esi, 0x465
ja 0x40468d
je case.0x404700.30010
lea eax, [esi - 0x45c]
cmp eax, 3
ja case.0x404700.30035
jmp dword [eax*4 + 0x404f98]
mov ebx, str.ega2.cpx
jmp 0x40477f
mov eax, esi
sub eax, 0x46b
je case.0x404700.30010
sub eax, 0x759
je case.0x404700.30010
sub eax, 9
jne case.0x404700.30035
mov ebx, str.ega16.cpx
jmp 0x40477f
mov ebx, str.ega10.cpx
jmp 0x40477f
cmp esi, 0x7530
ja 0x4046e0
je case.0x404700.30001
mov eax, esi
sub eax, 0xf06
je case.0x404630.856
sub eax, 2
jne case.0x404700.30035
mov ebx, str.ega18.cpx
jmp 0x40477f
cmp esi, 0xe328
ja 0x404731
je case.0x404700.30002
lea eax, [esi - 0x7531]
cmp eax, 0x27
ja case.0x404700.30035
movzx eax, byte [eax + 0x404fd4]
jmp dword [eax*4 + 0x404fa8]
mov ebx, str.ega4.cpx
jmp 0x40477f
mov ebx, str.ega7.cpx
jmp 0x40477f
mov ebx, str.ega11.cpx
jmp 0x40477f
mov ebx, str.ega14.cpx
jmp 0x40477f
mov ebx, str.ega15.cpx
jmp 0x40477f
mov ebx, str.ega17.cpx
jmp 0x40477f
cmp esi, 0xe9b5
ja 0x404757
je case.0x404700.30008
mov eax, esi
sub eax, 0xe362
je case.0x404700.30008
sub eax, 0x7d
je case.0x404700.30003
sub eax, 0x383
jmp 0x40476d
mov ebx, str.ega12
jmp 0x40477f
cmp esi, 0xeb62
je case.0x404700.30008
cmp esi, 0xedb5
je case.0x404700.30008
cmp esi, 0xf362
je case.0x404700.30002
xor ebx, ebx
jmp 0x40477f
mov ebx, str.ega13.cpx
jmp 0x40477f
mov ebx, str.ega6.cpx
test ebx, ebx
je case.0x4047ec.776
cmp esi, 0x352
jne 0x40483f
mov esi, 0x35a
jmp 0x40483f
cmp esi, 0x2e1
ja 0x4047da
je case.0x4047ec.857
cmp esi, 0x1b5
je case.0x4047ec.850
xor eax, eax
nop dword [eax]
cmp dword [eax*8 + 0x5533a8], esi
je 0x404808
inc eax
cmp eax, 0x73
jb 0x4047b0
push 0x1b3
push str.D:_a_rufus_rufus_srcdos_locale.c
push str.i___ARRAYSIZE_cp_hr_list_
call fcn.004dfbbc
add esp, 0xc
xor eax, eax
jmp 0x40480f
lea eax, [esi - 0x307]
cmp eax, 0x5e
ja case.0x4047ec.776
movzx eax, byte [eax + 0x40500c]
jmp dword [eax*4 + 0x404ffc]
mov ebx, str.ega.cpi
jmp 0x40483f
mov ebx, str.ega2.cpi
jmp 0x40483f
mov ebx, str.ega3.cpi
jmp 0x40483f
mov eax, dword [eax*8 + 0x5533ac]
push eax
push esi
push str.Unable_to_find_an_EGA_file_with_codepage__d___s__n
call fcn.0044b0b0
mov esi, dword [ebp - 0x120]
add esp, 0xc
cmp dword [ebp - 0x118], 0
mov ebx, str.ega.cpx
mov eax, str.ega.cpi
cmove ebx, eax
mov esi, dword [esi*8 + 0x553388]
xor eax, eax
cmp dword [eax*8 + 0x5533a8], esi
je 0x40486b
inc eax
cmp eax, 0x73
jb 0x404841
push 0x1b3
push str.D:_a_rufus_rufus_srcdos_locale.c
push str.i___ARRAYSIZE_cp_hr_list_
call fcn.004dfbbc
add esp, 0xc
xor eax, eax
jmp 0x404872
mov eax, dword [eax*8 + 0x5533ac]
push eax
push esi
push str.Will_use_codepage__d___s__n
call fcn.0044b0b0
add esp, 0xc
cmp esi, 0x1b5
jne 0x404a44
mov eax, dword [ebp - 0x124]
mov ecx, 0x5283f0
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4048b8
test dl, dl
je 0x4048b4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4048b8
add eax, 2
add ecx, 2
test dl, dl
jne 0x404898
xor eax, eax
jmp 0x4048bd
sbb eax, eax
or eax, 1
test eax, eax
jne 0x404a44
test edi, edi
jne 0x4048ce
xor ecx, ecx
inc ecx
jmp 0x404901
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4048d3
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x104
jae 0x4048fc
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4048f0
sub ecx, edx
inc ecx
jmp 0x404901
mov ecx, 0x104
push ecx
lea eax, [ebp - 0x110]
push edi
push eax
call fcn.004aab70
add esp, 0xc
test edi, edi
jne 0x404919
inc edi
jmp 0x404947
mov ecx, edi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404920
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x104
jae 0x404942
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x404936
sub edi, ecx
inc edi
jmp 0x404947
mov edi, 0x104
lea ecx, [ebp - 0x110]
mov byte [ebp + edi - 0x111], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404958
sub ecx, edx
mov eax, 0x103
sub eax, ecx
mov ecx, 0xe
cmp eax, ecx
cmova eax, ecx
push eax
lea eax, [ebp - 0x110]
push str.AUTOEXEC.BAT
push eax
call fcn.004d16a0
add esp, 0xc
lea eax, [ebp - 0x110]
push 0x529018
push eax
call fcn.004d14af
mov esi, eax
add esp, 8
test esi, esi
jne 0x4049c7
call fcn.0044b6b0
push eax
push str.Unable_to_create_AUTOEXEC.BAT:__s._n
call fcn.0044b0b0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8b60
mov esp, ebp
pop ebp
ret
push str._echo_off_n
push esi
call fcn.00401040
push str.set_PATH.__LOCALE_n
push esi
call fcn.00401040
add esp, 0x10
xor eax, eax
cmp dword [eax*8 + 0x5533a8], 0x1b5
je 0x404a10
inc eax
cmp eax, 0x73
jb 0x4049e2
push 0x1b3
push str.D:_a_rufus_rufus_srcdos_locale.c
push str.i___ARRAYSIZE_cp_hr_list_
call fcn.004dfbbc
add esp, 0xc
xor eax, eax
jmp 0x404a17
mov eax, dword [eax*8 + 0x5533ac]
push 0x1b5
push eax
mov ecx, 0x5283f0
call fcn.004035c0
push eax
push str.echo_Using__s_keyboard_with__s_codepage___d__n
push esi
call fcn.00401040
add esp, 0x14
push esi
call fcn.004d1662
add esp, 4
jmp 0x404e59
test edi, edi
jne 0x404a4d
xor ecx, ecx
inc ecx
jmp 0x404a81
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404a52
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x104
jae 0x404a7c
mov ecx, edi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404a70
sub ecx, edx
inc ecx
jmp 0x404a81
mov ecx, 0x104
push ecx
lea eax, [ebp - 0x110]
push edi
push eax
call fcn.004aab70
add esp, 0xc
test edi, edi
jne 0x404a9b
xor ecx, ecx
inc ecx
jmp 0x404ac9
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404aa0
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x104
jae 0x404ac4
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404ab8
sub ecx, edx
inc ecx
jmp 0x404ac9
mov ecx, 0x104
mov byte [ebp + ecx - 0x111], 0
lea ecx, [ebp - 0x110]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404ae0
sub ecx, edx
mov eax, 0x103
sub eax, ecx
mov ecx, 0xc
cmp eax, ecx
cmova eax, ecx
push eax
lea eax, [ebp - 0x110]
push str.CONFIG.SYS
push eax
call fcn.004d16a0
add esp, 0xc
lea eax, [ebp - 0x110]
push 0x529018
push eax
call fcn.004d14af
add esp, 8
mov dword [ebp - 0x114], eax
test eax, eax
jne 0x404b53
call fcn.0044b6b0
push eax
push str.Unable_to_create_CONFIG.SYS:__s._n
call fcn.0044b0b0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8b60
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x118], 0
je 0x404b77
push str._MENUCOLOR7_0_nMENU_nMENU___FreeDOS_Language_Selection_Menu_n
push eax
call fcn.00401040
mov eax, dword [ebp - 0x114]
add esp, 8
mov ecx, 0x529128
jmp 0x404b7c
mov ecx, str._MENU__n
push ecx
push eax
call fcn.00401040
push str.MENUDEFAULT1_5_n
push dword [ebp - 0x114]
call fcn.00401040
add esp, 0x10
xor eax, eax
nop dword [eax + eax]
cmp dword [eax*8 + 0x5533a8], esi
je 0x404bca
inc eax
cmp eax, 0x73
jb 0x404ba0
push 0x1b3
push str.D:_a_rufus_rufus_srcdos_locale.c
push str.i___ARRAYSIZE_cp_hr_list_
call fcn.004dfbbc
add esp, 0xc
xor eax, eax
jmp 0x404bd1
mov eax, dword [eax*8 + 0x5533ac]
mov edx, dword [ebp - 0x118]
mov ecx, 0x2c
test edx, edx
mov dword [ebp - 0x11c], 0x29
push esi
cmovne ecx, dword [ebp - 0x11c]
mov dword [ebp - 0x128], ecx
mov ecx, str.MENU
mov dword [ebp - 0x11c], str.MENUITEM
cmove ecx, dword [ebp - 0x11c]
mov dword [ebp - 0x11c], ecx
mov ecx, dword [ebp - 0x124]
push eax
call fcn.004035c0
push eax
push dword [ebp - 0x128]
push dword [ebp - 0x11c]
push str._s1_c_Use__s_keyboard_with__s_codepage___d__n
push dword [ebp - 0x114]
call fcn.00401040
add esp, 0x1c
xor eax, eax
cmp dword [eax*8 + 0x5533a8], 0x1b5
je 0x404c6e
inc eax
cmp eax, 0x73
jb 0x404c40
push 0x1b3
push str.D:_a_rufus_rufus_srcdos_locale.c
push str.i___ARRAYSIZE_cp_hr_list_
call fcn.004dfbbc
add esp, 0xc
xor eax, eax
jmp 0x404c75
mov eax, dword [eax*8 + 0x5533ac]
push 0x1b5
push eax
mov ecx, 0x5283f0
call fcn.004035c0
push eax
push dword [ebp - 0x128]
push dword [ebp - 0x11c]
push str._s2_c_Use__s_keyboard_with__s_codepage___d__n
push dword [ebp - 0x114]
call fcn.00401040
add esp, 0x1c
mov ecx, str._1__ndevicelocaledisplay.sys_con_ega__1__n_2__n
cmp dword [ebp - 0x118], 0
mov eax, str.MENU_n12__n
cmove eax, ecx
push eax
push 0x525f4c
push dword [ebp - 0x114]
call fcn.00401040
add esp, 0xc
push dword [ebp - 0x114]
call fcn.004d1662
add esp, 4
push str.Successfully_wrote_CONFIG.SYS_n
call fcn.0044b0b0
add esp, 4
test edi, edi
jne 0x404cf1
xor ecx, ecx
inc ecx
jmp 0x404d21
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404cf6
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x104
jae 0x404d1c
mov ecx, edi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404d10
sub ecx, edx
inc ecx
jmp 0x404d21
mov ecx, 0x104
push ecx
lea eax, [ebp - 0x110]
push edi
push eax
call fcn.004aab70
add esp, 0xc
test edi, edi
jne 0x404d39
inc edi
jmp 0x404d67
mov ecx, edi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404d40
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x104
jae 0x404d62
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x404d56
sub edi, ecx
inc edi
jmp 0x404d67
mov edi, 0x104
lea ecx, [ebp - 0x110]
mov byte [ebp + edi - 0x111], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404d78
sub ecx, edx
mov eax, 0x103
sub eax, ecx
mov ecx, 0xe
cmp eax, ecx
cmova eax, ecx
push eax
lea eax, [ebp - 0x110]
push str.AUTOEXEC.BAT
push eax
call fcn.004d16a0
add esp, 0xc
lea eax, [ebp - 0x110]
push 0x529018
push eax
call fcn.004d14af
mov edi, eax
add esp, 8
test edi, edi
je 0x4049a1
push str._echo_off_n
push edi
call fcn.00401040
push str.set_PATH.__LOCALE_n
push edi
call fcn.00401040
add esp, 0x10
cmp dword [ebp - 0x118], 0
je 0x404df5
push str.display_con_ega__1__n
push edi
call fcn.00401040
add esp, 8
push str.GOTO___CONFIG___n
push edi
call fcn.00401040
push 0x529278
push edi
call fcn.00401040
push ebx
push esi
push str.mode_con_codepage_prepare___d__locale_s____NUL_n
push edi
call fcn.00401040
push esi
push str.mode_con_codepage_select_d___NUL_n
push edi
call fcn.00401040
mov eax, dword [ebp - 0x120]
add esp, 0x2c
push dword [eax*8 + 0x553384]
push dword [ebp - 0x124]
push str.keyb__s__locale_s_n
push edi
call fcn.00401040
push 0x5292ec
push edi
call fcn.00401040
push edi
call fcn.004d1662
add esp, 0x1c
push str.Successfully_wrote_AUTOEXEC.BAT_n
call fcn.0044b0b0
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
mov eax, 1
pop edi
pop esi
pop ebx
call fcn.004a8b60
mov esp, ebp
pop ebp
ret