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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea ebx, [ebp - 0x11c]
sub esp, 0x15c
mov dword [esp], ebx
call dword [sym.imp.USER32.dll_GetKeyboardLayoutNameA]
push eax
lea eax, [ebp - 0x120]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x49681d
mov dword [esp], ebx
call sub.msvcrt.dll_sscanf
test eax, eax
jne 0x406571
mov dword [esp], str.Could_not_scan_keyboard_layout_name___falling_back_to_US_as_default_n
call fcn.0043efa9
mov dword [ebp - 0x120], 0x409
mov eax, dword [ebp - 0x120]
mov dword [esp], str.Windows_KBID_0x_08x_n
mov dword [esp + 4], eax
call fcn.0043efa9
xor edx, edx
mov eax, dword [ebp - 0x120]
cmp eax, 0x46e
ja 0x40688b
cmp eax, 0x401
ja 0x4065b2
lea ecx, [eax - 1]
cmp ecx, 0x43
jbe switch.0x004066b8
jmp case.0x406aa9.132099
lea ecx, [eax - 0x402]
cmp ecx, 0x6c
ja case.0x406aa9.132099
jmp dword [ecx*4 + 0x496c08]
mov ebx, 0x496685
jmp 0x406db0
mov ebx, 0x4966fa
jmp 0x406db0
mov ebx, 0x4966f7
jmp 0x406db0
mov ebx, 0x4966f1
jmp 0x406db0
mov ebx, 0x4966e8
jmp 0x406db0
mov ebx, 0x4966e5
jmp 0x406db0
mov ebx, 0x4966d9
jmp 0x406db0
mov ebx, 0x4966d0
jmp 0x406db0
mov ebx, 0x4966ca
jmp 0x406db0
mov ebx, 0x4966c7
jmp 0x406db0
mov ebx, 0x4966c4
jmp 0x406db0
mov ebx, 0x4966be
jmp 0x406db0
mov ebx, 0x4966bb
jmp 0x406db0
mov ebx, 0x4966b8
jmp 0x406db0
mov ebx, 0x4966b5
jmp 0x406db0
mov ebx, 0x4966af
jmp 0x406db0
mov ebx, 0x4966a9
jmp 0x406db0
mov ebx, 0x496694
jmp 0x406db0
mov ebx, 0x49667f
jmp 0x406db0
mov ebx, 0x496679
jmp 0x406db0
mov ebx, 0x496676
jmp 0x406db0
mov ebx, 0x496673
jmp 0x406db0
mov ebx, 0x496670
jmp 0x406db0
mov ebx, 0x496700
jmp 0x406db0
jmp dword [ecx*4 + 0x496dbc]
mov ebx, 0x49670f
jmp 0x406db0
mov ebx, 0x49670c
jmp 0x406db0
mov ebx, 0x496706
jmp 0x406db0
mov ebx, 0x496703
jmp 0x406db0
mov ebx, 0x496700
jmp 0x406db0
mov ebx, 0x4966fd
jmp 0x406db0
mov ebx, 0x4966f7
jmp 0x406db0
mov ebx, 0x4966f4
jmp 0x406db0
mov ebx, 0x4966f1
jmp 0x406db0
mov ebx, 0x4966ee
jmp 0x406db0
mov ebx, 0x4966eb
jmp 0x406db0
mov ebx, 0x4966e8
jmp 0x406db0
mov ebx, 0x4966e5
jmp 0x406db0
mov ebx, 0x4966e2
jmp 0x406db0
mov ebx, 0x4966df
jmp 0x406db0
mov ebx, 0x4966dc
jmp 0x406db0
mov ebx, 0x4966d9
jmp 0x406db0
mov ebx, 0x4966d6
jmp 0x406db0
mov ebx, 0x4966d3
jmp 0x406db0
mov ebx, 0x4966d0
jmp 0x406db0
mov ebx, 0x4966ca
jmp 0x406db0
mov ebx, 0x4966c7
jmp 0x406db0
mov ebx, 0x4966c4
jmp 0x406db0
mov ebx, 0x4966be
jmp 0x406db0
mov ebx, 0x4966bb
jmp 0x406db0
mov ebx, 0x4966b8
jmp 0x406db0
mov ebx, 0x4966b5
jmp 0x406db0
mov ebx, 0x4966b2
jmp 0x406db0
mov ebx, 0x4966af
jmp 0x406db0
mov ebx, 0x4966ac
jmp 0x406db0
mov ebx, 0x4966a9
jmp 0x406db0
mov ebx, 0x4966a6
jmp 0x406db0
mov ebx, 0x49669d
jmp 0x406db0
mov ebx, 0x49669a
jmp 0x406db0
mov ebx, 0x496694
jmp 0x406db0
mov ebx, 0x49667f
jmp 0x406db0
mov ebx, 0x496679
jmp 0x406db0
mov ebx, 0x496676
jmp 0x406db0
mov ebx, 0x496673
jmp 0x406db0
mov ebx, 0x496670
jmp 0x406db0
mov ebx, 0x49666d
jmp 0x406db0
mov ebx, 0x4966fa
jmp 0x406db0
mov ebx, 0x4966f4
jmp 0x406db0
mov ebx, 0x4966dc
jmp 0x406db0
mov ebx, 0x4966d6
jmp 0x406db0
mov ebx, 0x49669a
jmp 0x406db0
cmp eax, 0x1043b
ja 0x406a7b
cmp eax, 0x10400
jbe 0x406989
lea ecx, [eax - 0x10401]
cmp ecx, 0x3a
ja case.0x406aa9.132099
jmp dword [ecx*4 + 0x496ecc]
mov ebx, 0x496700
jmp 0x406db0
mov ebx, 0x4966fa
jmp 0x406db0
mov ebx, 0x49668b
jmp 0x406db0
mov ebx, 0x49667f
jmp 0x406db0
mov ebx, 0x496673
jmp 0x406db0
mov ebx, 0x49666d
jmp 0x406db0
mov ebx, 0x4966f7
jmp 0x406db0
mov ebx, 0x4966f1
jmp 0x406db0
mov ebx, 0x4966e5
jmp 0x406db0
mov ebx, 0x4966d9
jmp 0x406db0
mov ebx, 0x4966d0
jmp 0x406db0
mov ebx, 0x4966c7
jmp 0x406db0
mov ebx, 0x4966be
jmp 0x406db0
mov ebx, 0x4966bb
jmp 0x406db0
mov ebx, 0x4966b8
jmp 0x406db0
mov ebx, 0x4966af
jmp 0x406db0
mov ebx, 0x4966a9
jmp 0x406db0
mov ebx, 0x496694
jmp 0x406db0
mov ebx, 0x496679
jmp 0x406db0
mov ebx, 0x4966e8
jmp 0x406db0
mov ebx, 0x4966c4
jmp 0x406db0
cmp eax, 0x82c
je 0x406cdd
ja 0x4069de
lea ecx, [eax - 0x804]
cmp ecx, 0x16
ja case.0x406aa9.132099
jmp dword [ecx*4 + 0x496fb8]
mov ebx, 0x496697
jmp 0x406db0
mov ebx, 0x496685
jmp 0x406db0
mov ebx, 0x496670
jmp 0x406db0
mov ebx, 0x4966ca
jmp 0x406db0
mov ebx, 0x4966b5
jmp 0x406db0
cmp eax, 0x1009
je 0x406ce7
ja 0x406a39
cmp eax, 0xc0c
je 0x406cf1
ja 0x406a1e
cmp eax, 0x843
je 0x406cfb
cmp eax, 0xc04
je 0x406d05
cmp eax, 0x83b
je 0x406d0f
jmp case.0x406aa9.132099
cmp eax, 0xc1a
je 0x406d19
cmp eax, 0x1004
je 0x406d23
jmp case.0x406aa9.132099
cmp eax, 0x100c
je 0x406d2d
cmp eax, 0x100b
jbe case.0x406aa9.132099
cmp eax, 0x201a
je 0x406d34
ja case.0x406aa9.132099
cmp eax, 0x1404
je 0x406d3b
cmp eax, 0x1809
je 0x406d42
jmp case.0x406aa9.132099
cmp eax, 0x20427
je 0x406d49
ja 0x406b21
cmp eax, 0x20409
ja 0x406b06
cmp eax, 0x20400
jbe 0x406ace
lea ecx, [eax - 0x20401]
cmp ecx, 8
ja case.0x406aa9.132099
jmp dword [ecx*4 + 0x497014]
mov ebx, 0x49667f
jmp 0x406db0
mov ebx, 0x49666d
jmp 0x406db0
mov ebx, 0x496673
jmp 0x406db0
cmp eax, 0x1083b
je 0x406d50
ja 0x406aeb
cmp eax, 0x1080c
je 0x406d57
jmp case.0x406aa9.132099
cmp eax, 0x11009
je 0x406d5e
cmp eax, 0x11809
je 0x406d65
jmp case.0x406aa9.132099
cmp eax, 0x20418
je 0x406d6c
cmp eax, 0x20422
je 0x406d73
jmp case.0x406aa9.132099
cmp eax, 0x40402
je 0x406d7a
ja 0x406b65
cmp eax, 0x30409
je 0x406d81
ja case.0x406aa9.132099
cmp eax, 0x30402
je 0x406d88
cmp eax, 0x30408
je 0x406d8f
cmp eax, 0x20437
je 0x406d96
jmp case.0x406aa9.132099
cmp eax, 0x40409
je 0x406d9d
ja 0x406b82
cmp eax, 0x40408
je 0x406da4
jmp case.0x406aa9.132099
cmp eax, 0x50409
je case.0x406aa9.132105
lea ecx, [eax - 0x50408]
and ecx, 0xfffeffff
jne case.0x406aa9.132099
jmp 0x406dab
mov ebx, 0x49669d
jmp 0x406db0
mov ebx, 0x4966a0
jmp 0x406db0
mov ebx, 0x4966a6
jmp 0x406db0
mov ebx, 0x4966ac
jmp 0x406db0
mov ebx, 0x4966b2
jmp 0x406db0
mov ebx, 0x4966c1
jmp 0x406db0
mov ebx, 0x4966d3
jmp 0x406db0
mov ebx, 0x4966df
jmp 0x406db0
mov ebx, 0x4966e2
jmp 0x406db0
mov ebx, 0x4966eb
jmp 0x406db0
mov ebx, 0x4966ee
jmp 0x406db0
mov ebx, 0x4966fd
jmp 0x406db0
mov ebx, 0x496703
jmp 0x406db0
mov ebx, 0x496706
jmp 0x406db0
mov ebx, 0x496709
jmp 0x406db0
mov ebx, 0x49670c
jmp 0x406db0
mov ebx, 0x49670f
jmp 0x406db0
test edx, edx
jne 0x406c67
and eax, 0x3ff
mov edx, 1
mov dword [ebp - 0x120], eax
jmp 0x406589
dec edx
jne 0x406c95
call dword [sym.imp.KERNEL32.DLL_GetSystemDefaultLangID]
and eax, 0x3ff
mov dword [ebp - 0x120], eax
mov dword [esp + 4], eax
mov dword [esp], str.Unable_to_match_KBID__trying_LangID_0x_04x_n
call fcn.0043efa9
mov edx, 2
jmp 0x406589
mov dword [esp], str.Unable_to_match_KBID_and_LangID___defaulting_to_US_n
call fcn.0043efa9
mov ebx, 0x496682
jmp 0x406db0
mov ebx, 0x49666a
jmp 0x406db0
mov ebx, 0x49666a
jmp 0x406db0
mov ebx, 0x49667c
jmp 0x406db0
mov ebx, 0x49666d
jmp 0x406db0
mov ebx, 0x49666a
jmp 0x406db0
mov ebx, 0x4966f4
jmp 0x406db0
mov ebx, 0x496688
jmp 0x406db0
mov ebx, 0x496688
jmp 0x406db0
mov ebx, 0x496709
jmp 0x406db0
mov ebx, 0x496670
jmp 0x406db0
mov ebx, 0x4966d6
jmp 0x406db0
mov ebx, 0x4966cd
jmp 0x406db0
mov ebx, 0x496670
jmp 0x406db0
mov ebx, 0x4966a3
jmp 0x406db0
mov ebx, 0x4966cd
jmp 0x406db0
mov ebx, 0x496670
jmp 0x406db0
mov ebx, 0x496685
jmp 0x406db0
mov ebx, 0x4966e8
jmp 0x406db0
mov ebx, 0x49669a
jmp 0x406db0
mov ebx, 0x4966a0
jmp 0x406db0
mov ebx, 0x496688
jmp 0x406db0
mov ebx, 0x496685
jmp 0x406db0
mov ebx, 0x4966c4
jmp 0x406db0
mov ebx, 0x4966dc
jmp 0x406db0
mov ebx, 0x49666d
jmp 0x406db0
mov ebx, 0x49668e
jmp 0x406db0
mov ebx, 0x49666d
jmp 0x406db0
mov ebx, 0x49667f
jmp 0x406db0
mov ebx, 0x4966fa
jmp 0x406db0
mov ebx, 0x496691
jmp 0x406db0
mov ebx, 0x49667f
jmp 0x406db0
mov ebx, 0x49667f
cmp dword [ebp + 0xc], 0
mov eax, ebx
je 0x406dbf
call fcn.004063ac
jmp 0x406dc4
call fcn.0040640f
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x130], 0
jns 0x406e2b
mov dword [esp + 4], ebx
mov dword [esp], str.Keyboard_id__s_is_not_supported___falling_back_to_us_n
call fcn.0043efa9
cmp dword [ebp + 0xc], 0
mov eax, 0x496682
je 0x406df5
call fcn.004063ac
jmp 0x406dfa
call fcn.0040640f
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x130], 0
mov ebx, 0x496682
jns 0x406e2b
mov dword [esp + 8], 0x3d9
mov dword [esp + 4], str.dos_locale.c
mov dword [esp], str.kbdrv___0
call dword [0x494088]
mov eax, ebx
call fcn.004064ae
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp], str.Will_use_DOS_keyboard__s___s__n
call fcn.0043efa9
call dword [sym.imp.KERNEL32.DLL_GetOEMCP]
mov dword [ebp - 0x12c], eax
cmp eax, 0xfde9
jne 0x406e9c
call dword [sym.imp.KERNEL32.DLL_GetUserDefaultUILanguage]
lea edx, [ebp - 0x120]
mov dword [esp + 0xc], 4
movzx eax, ax
mov dword [esp + 8], edx
mov dword [esp + 4], 0x2000000b
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GetLocaleInfoA]
sub esp, 0x10
test eax, eax
je case.0x4070d6.30035
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x12c], eax
cmp dword [ebp + 0xc], 0
je 0x407186
cmp dword [ebp - 0x12c], 0xbcd
je case.0x4070d6.30022
ja 0x407010
cmp dword [ebp - 0x12c], 0x383
ja 0x406fb1
cmp dword [ebp - 0x12c], 0x34f
ja 0x406f35
cmp dword [ebp - 0x12c], 0x316
ja 0x406f9d
cmp dword [ebp - 0x12c], 0x301
ja 0x406f64
cmp dword [ebp - 0x12c], 0x29c
ja 0x406f89
cmp dword [ebp - 0x12c], 0x29a
ja case.0x406f78.790
cmp dword [ebp - 0x12c], 0x71
je case.0x406f49.851
cmp dword [ebp - 0x12c], 0x1b5
mov edx, str.ega.cpx
jmp 0x407171
mov eax, dword [ebp - 0x12c]
sub eax, 0x350
cmp eax, 0x33
ja case.0x4070d6.30035
jmp dword [eax*4 + 0x497038]
mov edx, str.ega9.cpx
jmp 0x4072a7
mov edx, str.ega.cpx
jmp 0x4072a7
mov eax, dword [ebp - 0x12c]
sub eax, 0x302
cmp eax, 0x14
ja case.0x4070d6.30035
jmp dword [eax*4 + 0x497108]
mov edx, str.ega8.cpx
jmp 0x4072a7
cmp dword [ebp - 0x12c], 0x2e1
mov edx, str.ega5.cpx
jmp 0x407171
cmp dword [ebp - 0x12c], 0x328
mov edx, str.ega3.cpx
jmp 0x407171
cmp dword [ebp - 0x12c], 0x465
je case.0x406f49.848
ja 0x406fec
cmp dword [ebp - 0x12c], 0x3df
je case.0x406f78.790
mov eax, dword [ebp - 0x12c]
sub eax, 0x45c
cmp eax, 3
jbe case.0x406f49.859
jmp case.0x4070d6.30035
cmp dword [ebp - 0x12c], 0x46b
mov edx, str.ega4.cpx
je 0x4072a7
cmp dword [ebp - 0x12c], 0xbc4
jmp 0x407171
cmp dword [ebp - 0x12c], 0x7543
ja 0x4070b6
cmp dword [ebp - 0x12c], 0x7539
mov eax, dword [ebp - 0x12c]
jbe 0x407063
lea ecx, [eax - 0x753a]
mov eax, 1
mov edx, str.ega7.cpx
shl eax, cl
test eax, 0x39a
jne 0x4072a7
test al, 0x64
mov edx, str.ega4.cpx
mov eax, str.ega14.cpx
cmovne edx, eax
jmp 0x4072a7
cmp dword [ebp - 0x12c], 0x752f
jbe 0x407094
sub eax, 0x7532
cmp eax, 6
ja case.0x407079.30004
jmp dword [eax*4 + 0x49715c]
mov edx, str.ega11.cpx
jmp 0x4072a7
mov edx, str.ega12
jmp 0x4072a7
sub eax, 0xf06
and eax, 0xfffffffd
je case.0x406f49.856
cmp dword [ebp - 0x12c], 0xf05
mov edx, str.ega10.cpx
jmp 0x407171
cmp dword [ebp - 0x12c], 0x7558
ja 0x4070e7
mov eax, dword [ebp - 0x12c]
sub eax, 0x7544
cmp eax, 0x14
ja case.0x4070d6.30035
jmp dword [eax*4 + 0x497178]
mov edx, str.ega15.cpx
jmp 0x4072a7
cmp dword [ebp - 0x12c], 0xe762
je case.0x407079.30002
ja 0x40712f
cmp dword [ebp - 0x12c], 0xe362
je case.0x407079.30008
cmp dword [ebp - 0x12c], 0xe3df
mov edx, str.ega12
je 0x4072a7
cmp dword [ebp - 0x12c], 0xe328
mov edx, str.ega13.cpx
jmp 0x407171
cmp dword [ebp - 0x12c], 0xedb5
je case.0x407079.30008
ja 0x407162
cmp dword [ebp - 0x12c], 0xe9b5
mov edx, str.ega6.cpx
je 0x4072a7
cmp dword [ebp - 0x12c], 0xeb62
jmp 0x407171
cmp dword [ebp - 0x12c], 0xf362
mov edx, str.ega13.cpx
je 0x4072a7
jmp case.0x4070d6.30035
mov edx, str.ega17.cpx
jmp 0x4072a7
cmp dword [ebp - 0x12c], 0x365
ja case.0x4070d6.30035
cmp dword [ebp - 0x12c], 0x351
ja 0x4071cf
cmp dword [ebp - 0x12c], 0x2e1
je 0x40729b
cmp dword [ebp - 0x12c], 0x307
je 0x4072a2
cmp dword [ebp - 0x12c], 0x1b5
jne case.0x4070d6.30035
jmp 0x407294
mov eax, dword [ebp - 0x12c]
lea ecx, [eax - 0x352]
mov eax, 1
shl eax, cl
test eax, 0xa405
jne 0x407294
test eax, 0x80880
jne 0x40729b
test eax, 0x10020
jne 0x4072a2
mov eax, dword [ebp - 0x12c]
call fcn.00406472
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x12c]
mov dword [esp], str.Unable_to_find_an_EGA_file_with_codepage__d___s__n
mov dword [esp + 4], eax
call fcn.0043efa9
mov eax, dword [ebp - 0x130]
cmp dword [ebp + 0xc], 0
mov edx, str.ega.cpi
mov eax, dword [eax*8 + 0x497ec4]
mov dword [ebp - 0x12c], eax
mov eax, str.ega.cpx
cmovne edx, eax
jmp 0x4072c9
mov edx, str.ega3.cpx
jmp 0x4072a7
mov edx, str.ega16.cpx
jmp 0x4072a7
mov edx, str.ega5.cpx
jmp 0x4072a7
mov edx, str.ega14.cpx
jmp 0x4072a7
mov edx, str.ega2.cpx
jmp 0x4072a7
mov edx, str.ega4.cpx
jmp 0x4072a7
mov edx, str.ega10.cpx
jmp 0x4072a7
mov edx, str.ega18.cpx
jmp 0x4072a7
mov edx, str.ega13.cpx
jmp 0x4072a7
mov edx, str.ega6.cpx
jmp 0x4072a7
mov edx, str.ega.cpi
jmp 0x4072a7
mov edx, str.ega2.cpi
jmp 0x4072a7
mov edx, str.ega3.cpi
cmp dword [ebp + 0xc], 0
je 0x4072c9
cmp dword [ebp - 0x12c], 0x352
mov eax, 0x35a
cmovne eax, dword [ebp - 0x12c]
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp - 0x12c]
mov dword [ebp - 0x134], edx
call fcn.00406472
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x12c]
mov dword [esp], str.Will_use_codepage__d___s__n
mov dword [esp + 4], eax
call fcn.0043efa9
mov edx, dword [ebp - 0x134]
cmp dword [ebp - 0x12c], 0x1b5
jne 0x407420
mov dword [esp + 4], 0x496682
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
mov edx, dword [ebp - 0x134]
test eax, eax
jne 0x407420
cmp dword [ebp + 8], 0
mov ecx, 1
je 0x40734b
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
lea ecx, [eax + 1]
mov eax, 0x104
cmp ecx, eax
cmova ecx, eax
lea ebx, [ebp - 0x11c]
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov edi, ebx
rep movsb byte es:[edi], byte [esi]
mov dword [esp], eax
mov esi, 0x103
call sub.msvcrt.dll_strlen
lea edx, [eax + 1]
cmp edx, 0x104
cmovae eax, esi
mov byte [ebp + eax - 0x11c], 0
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov dword [esp], ebx
mov edx, eax
mov eax, esi
mov dword [esp + 4], str.AUTOEXEC.BAT
sub eax, edx
mov edx, 0xe
cmp eax, edx
cmova eax, edx
mov dword [esp + 8], eax
call sub.msvcrt.dll_strncat
mov dword [esp], ebx
mov dword [esp + 4], 0x4969a6
call sub.msvcrt.dll_fopen
mov ebx, eax
test eax, eax
je 0x4076d6
mov dword [esp + 4], eax
mov dword [esp], str._echo_off_n
call sub.msvcrt.dll_fputs
mov dword [esp + 4], ebx
mov dword [esp], str.set_PATH.__LOCALE_n
call sub.msvcrt.dll_fputs
mov eax, 0x1b5
call fcn.00406472
mov esi, eax
mov eax, 0x496682
call fcn.004064ae
mov dword [esp + 0x10], 0x1b5
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.echo_Using__s_keyboard_with__s_codepage___d__n
mov dword [esp], ebx
call sub.msvcrt.dll_fprintf
mov dword [esp], ebx
jmp 0x4077cf
cmp dword [ebp + 8], 0
mov ecx, 1
je 0x40744f
mov eax, dword [ebp + 8]
mov dword [ebp - 0x134], edx
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov edx, dword [ebp - 0x134]
lea ecx, [eax + 1]
mov eax, 0x104
cmp ecx, eax
cmova ecx, eax
mov esi, dword [ebp + 8]
lea edi, [ebp - 0x11c]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x134], edx
rep movsb byte es:[edi], byte [esi]
mov esi, 0x103
mov dword [esp], eax
call sub.msvcrt.dll_strlen
lea ecx, [eax + 1]
cmp ecx, 0x104
cmovae eax, esi
mov byte [ebp + eax - 0x11c], 0
lea eax, [ebp - 0x11c]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp + 4], str.CONFIG.SYS
mov ecx, eax
mov eax, esi
sub eax, ecx
mov ecx, 0xc
cmp eax, ecx
cmova eax, ecx
mov dword [esp + 8], eax
lea eax, [ebp - 0x11c]
mov dword [esp], eax
call sub.msvcrt.dll_strncat
lea eax, [ebp - 0x11c]
mov dword [esp + 4], 0x4969a6
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov edx, dword [ebp - 0x134]
test eax, eax
mov esi, eax
jne 0x4074fa
call fcn.0043f53d
mov dword [esp], str.Unable_to_create_CONFIG.SYS:__s._n
mov dword [esp + 4], eax
call fcn.0043efa9
xor eax, eax
jmp 0x4077e5
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x134], edx
mov dword [esp + 4], eax
je 0x407523
mov dword [esp], str._MENUCOLOR7_0_nMENU_nMENU___FreeDOS_Language_Selection_Menu_n
call sub.msvcrt.dll_fputs
mov dword [esp + 4], esi
mov dword [esp], str.MENU
jmp 0x40752a
mov dword [esp], str._MENU__n
call sub.msvcrt.dll_fputs
mov edx, dword [ebp - 0x134]
mov edi, str.MENUITEM
mov dword [ebp - 0x13c], edx
mov dword [esp + 4], esi
mov dword [esp], str.MENUDEFAULT1_5_n
call sub.msvcrt.dll_fputs
mov eax, dword [ebp - 0x12c]
call fcn.00406472
mov dword [ebp - 0x134], eax
mov eax, ebx
call fcn.004064ae
cmp dword [ebp + 0xc], 1
mov edx, 0x4967d2
sbb ecx, ecx
and ecx, 3
add ecx, 0x29
cmp dword [ebp + 0xc], 0
cmovne edi, edx
mov edx, dword [ebp - 0x12c]
mov dword [esp + 0x18], edx
mov edx, dword [ebp - 0x134]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
mov dword [ebp - 0x138], ecx
mov dword [esp + 8], edi
mov dword [esp], esi
mov dword [esp + 4], str._s1_c_Use__s_keyboard_with__s_codepage___d__n
call sub.msvcrt.dll_fprintf
mov eax, 0x1b5
call fcn.00406472
mov dword [ebp - 0x134], eax
mov eax, 0x496682
call fcn.004064ae
mov dword [esp + 0x18], 0x1b5
mov ecx, dword [ebp - 0x134]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp - 0x138]
mov dword [esp + 8], edi
lea edi, [ebp - 0x11c]
mov dword [esp + 0xc], ecx
mov dword [esp], esi
mov dword [esp + 4], str._s2_c_Use__s_keyboard_with__s_codepage___d__n
call sub.msvcrt.dll_fprintf
cmp dword [ebp + 0xc], 0
mov ecx, str.MENU_n12__n
mov eax, str._1__ndevicelocaledisplay.sys_con_ega__1__n_2__n
cmovne eax, ecx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_fputs
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov dword [esp], str.Successfully_wrote_CONFIG.SYS_n
call fcn.0043efa9
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov esi, dword [ebp + 8]
lea ecx, [eax + 1]
mov eax, 0x104
cmp ecx, eax
cmova ecx, eax
mov eax, dword [ebp + 8]
rep movsb byte es:[edi], byte [esi]
mov esi, 0x103
mov dword [esp], eax
call sub.msvcrt.dll_strlen
lea ecx, [eax + 1]
cmp ecx, 0x104
cmovae eax, esi
mov byte [ebp + eax - 0x11c], 0
lea eax, [ebp - 0x11c]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp + 4], str.AUTOEXEC.BAT
mov ecx, eax
mov eax, esi
sub eax, ecx
mov ecx, 0xe
cmp eax, ecx
cmova eax, ecx
mov dword [esp + 8], eax
lea eax, [ebp - 0x11c]
mov dword [esp], eax
call sub.msvcrt.dll_strncat
lea eax, [ebp - 0x11c]
mov dword [esp + 4], 0x4969a6
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov edx, dword [ebp - 0x13c]
test eax, eax
mov esi, eax
jne 0x4076eb
call fcn.0043f53d
mov dword [esp], str.Unable_to_create_AUTOEXEC.BAT:__s._n
mov dword [esp + 4], eax
jmp 0x4074ee
mov dword [ebp - 0x134], edx
mov dword [esp + 4], eax
mov dword [esp], str._echo_off_n
call sub.msvcrt.dll_fputs
mov dword [esp + 4], esi
mov dword [esp], str.set_PATH.__LOCALE_n
call sub.msvcrt.dll_fputs
cmp dword [ebp + 0xc], 0
mov edx, dword [ebp - 0x134]
je 0x407733
mov dword [esp + 4], esi
mov dword [esp], str.display_con_ega__1__n
call sub.msvcrt.dll_fputs
mov edx, dword [ebp - 0x134]
mov dword [ebp - 0x134], edx
mov dword [esp + 4], str.GOTO___CONFIG___n
mov dword [esp], esi
call sub.msvcrt.dll_fprintf
mov dword [esp + 4], esi
mov dword [esp], 0x496b95
call sub.msvcrt.dll_fputs
mov edx, dword [ebp - 0x134]
mov dword [esp + 0xc], edx
mov eax, dword [ebp - 0x12c]
mov dword [esp + 4], str.mode_con_codepage_prepare___d__locale_s____NUL_n
mov dword [esp + 8], eax
mov dword [esp], esi
call sub.msvcrt.dll_fprintf
mov eax, dword [ebp - 0x12c]
mov dword [esp], esi
mov dword [esp + 4], str.mode_con_codepage_select_d___NUL_n
mov dword [esp + 8], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [ebp - 0x130]
mov dword [esp + 8], ebx
mov dword [esp + 4], str.keyb__s__locale_s_n
mov eax, dword [eax*8 + 0x497ec0]
mov dword [esp], esi
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fprintf
mov dword [esp + 4], esi
mov dword [esp], 0x496c04
call sub.msvcrt.dll_fputs
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov dword [esp], str.Successfully_wrote_AUTOEXEC.BAT_n
call fcn.0043efa9
mov eax, 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret