Function at 0x412f74
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
xor eax, eax
mov dword [ebp - 8], 4
mov dword [ebp - 4], eax
jmp 0x412f99
mov ecx, dword [ebp - 4]
mov dword [ebp + ecx*4 - 0x58], 0x7862
inc dword [ebp - 4]
cmp dword [ebp - 4], 2
jl 0x412f8b
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 8], eax
inc edi
jmp 0x413005
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 8]
mov ecx, dword [ebp - 8]
mov ecx, dword [ebp + ecx*4 - 0x58]
mov ecx, dword [ebp - 8]
mov ecx, dword [ebp + ecx*4 - 0x58]
mov ecx, dword [ebp - 8]
mov ecx, dword [ebp - 8]
mov ecx, dword [ebp + ecx*4 - 0x58]
mov ecx, dword [ebp - 8]
cmp dword [ebp - 8], edi
jl 0x412fdb
mov ecx, dword [ebp - 8]
mov edx, eax
cmp dword [ebp + ecx*4 - 0x58], eax
je 0x412fdd
mov edx, edi
mov ecx, dword [ebp - 8]
xor ebx, ebx
mov ecx, dword [ebp + ecx*4 - 0x58]
cmp ecx, edx
mov ecx, dword [ebp - 8]
setg bl
xor edx, edx
mov ecx, dword [ebp + ecx*4 - 0x58]
add ecx, 0x66a7
cmp ecx, ebx
setg dl
mov dword [ebp - 0x18], edx
inc dword [ebp - 8]
cmp dword [ebp - 8], edi
jle 0x412faa
mov dword [ebp - 0x14], 0xca63
mov byte [ebp - 9], al
cmp byte [ebp - 9], al
je 0x413029
push eax
push eax
push 0x14a5
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
xor eax, eax
mov byte [ebp - 0x35], al
cmp byte [ebp - 0x35], 0
je 0x413063
push eax
push 0x213a
push 0x112b
push 0x183f
push 0x240f
push 0x235b
push 0x16cd
push 0xec7
push 0x2210
push eax
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [ebp - 0x10], edi
lea ecx, [ebp - 0xdc]
mov dword [ebp - 0x14], 0xfffffffe
push edi
call fcn.0040fd61
mov dword [ebp - 0x80], 0xacc5d9b4
mov dword [ebp - 0x74], 0xfffffffd
mov dword [ebp - 0x6c], 0x28fdeb77
mov dword [ebp - 0xb4], edi
mov dword [ebp - 0x68], 0xe9d60a22
mov dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 4], 0
jmp 0x4130be
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xdc]
mov dword [eax + ecx*4], 8
inc dword [ebp - 4]
cmp dword [ebp - 4], edi
jl 0x4130ab
mov eax, dword [ebp - 0xdc]
xor ebx, ebx
mov edx, dword [eax]
test edx, edx
setne bl
xor eax, eax
test edx, edx
sete al
xor ecx, ecx
cmp edx, eax
setle cl
sub ecx, edx
mov dword [ebp - 0x80], ecx
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x6c]
sub eax, ebx
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0xb4], eax
jne 0x41310d
cmp dword [ebp - 0x68], 0
jne 0x41310d
xor ecx, ecx
jmp 0x41310f
mov ecx, edi
xor eax, eax
cmp ecx, 0x56ee
lea ecx, [ebp - 0xdc]
setne al
mov dword [ebp - 0x68], eax
call fcn.0040fe33
movdqa xmm0, xmmword [0xa97d80]
lea ecx, [ebp - 0xec]
mov dword [ebp - 0x14], 0xe87f6fb8
xor eax, eax
push dword [ebp - 0x14]
movdqu xmmword [ebp - 0xfc], xmm0
push ecx
lea ecx, [ebp - 0xfc]
mov dword [ebp - 0x98], eax
push ecx
push eax
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], eax
call fcn.004114f4
mov eax, dword [ebp - 0x98]
mov dword [eax], 0xf
mov byte [ebp - 0x3a], 0
cmp byte [ebp - 0x3a], 0
je 0x413191
push 0x132a
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov eax, dword [ebp - 0x98]
dec dword [eax]
cmp dword [eax], 9
jne 0x41317c
lea ecx, [ebp - 0x98]
call fcn.0040fe33
mov dword [ebp - 0x14], 0xed7c6ae4
xor eax, eax
mov dword [ebp - 0x14], 0x403ca955
mov dword [ebp - 0x14], 7
mov dword [ebp - 4], eax
jmp 0x4131d2
mov ecx, dword [ebp - 4]
mov dword [ebp + ecx*4 - 0xec], edi
inc dword [ebp - 4]
cmp dword [ebp - 4], edi
jl 0x4131c5
mov byte [ebp - 9], al
cmp byte [ebp - 9], al
je 0x4131e8
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
xor eax, eax
mov byte [ebp - 0x37], al
cmp byte [ebp - 0x37], 0
je 0x413208
push 0xe38
push 0x583
push eax
push 0x1348
push eax
call dword [sym.imp.USER32.dll_GetMenuStringW]
mov dword [ebp - 0x10], 0xfffffff9
jmp 0x41360a
push 2
lea ecx, [ebp - 0xd0]
call fcn.0040fd61
mov dword [ebp - 0x14], 0xfffffffc
call fcn.00412d2c
mov dword [ebp - 0x14], 0xdc6b79df
mov dword [ebp - 0xc0], 0xdfa860b4
mov dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 0x14], 0x9dbc9b78
mov dword [ebp - 0x14], 0xa938f738
mov dword [ebp - 0x14], 0xcfdfe92
mov byte [ebp - 9], 0
cmp byte [ebp - 9], 0
je 0x413271
push 0x5e9
push 0
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
lea ecx, [ebp - 0xc0]
call fcn.00412dc9
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xbc], 0xe52d
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0x1c], 0xe9829cbc
mov dword [ebp - 0x4c], eax
mov dword [ebp - 4], eax
jmp 0x4132b1
mov eax, dword [ebp - 4]
mov dword [ebp + eax*4 - 0x8c], 0xfffffffb
inc dword [ebp - 4]
cmp dword [ebp - 4], 3
jl 0x4132a0
lea eax, [ebp - 0xa0]
push eax
lea eax, [ebp - 0x1c]
push eax
lea edx, [ebp - 0x4c]
lea ecx, [ebp - 0xbc]
call fcn.00412ec3
pop ecx
xor eax, eax
pop ecx
mov dword [ebp - 0x1c], eax
jmp 0x41340a
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x1c]
cmp dword [ebp + ecx*4 - 0x8c], edi
jle 0x4132f5
mov ecx, dword [ebp - 0x1c]
mov ecx, dword [ebp + ecx*4 - 0x8c]
mov ecx, dword [ebp - 0x1c]
xor ebx, ebx
mov ecx, dword [ebp + ecx*4 - 0x8c]
mov ecx, dword [ebp - 0x1c]
mov ecx, dword [ebp + ecx*4 - 0x8c]
mov ecx, dword [ebp - 4]
cmp ecx, 0xebdc
mov ecx, dword [ebp - 4]
setne bl
xor edx, edx
cmp ebx, ecx
mov ecx, dword [ebp - 4]
setg dl
xor ebx, ebx
cmp edx, 0xac07
setne bl
xor edx, edx
cmp ebx, ecx
setg dl
xor ebx, ebx
mov dword [ebp - 0x4c], edx
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + ecx*4 - 0x8c]
mov ecx, dword [ebp - 0x4c]
cmp ecx, edx
mov ecx, dword [ebp - 4]
setl bl
imul ecx, ebx
test ecx, ecx
jne 0x413381
cmp dword [ebp - 4], eax
jne 0x413381
mov byte [ebp - 0x39], al
cmp byte [ebp - 0x39], cl
je 0x4133fb
push 0xe38
push 0x583
push eax
push 0x1348
push eax
call dword [sym.imp.USER32.dll_GetMenuStringW]
jmp 0x4133f9
push edi
lea ecx, [ebp - 0xe8]
call fcn.0040fd61
mov dword [ebp - 0x18], 0xfff6
mov dword [ebp - 0x40], 0
jmp 0x4133b0
mov ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0xe8]
mov dword [eax + ecx*4], 0x77dc9657
inc dword [ebp - 0x40]
cmp dword [ebp - 0x40], edi
jl 0x41339d
mov eax, dword [ebp - 0xe8]
xor edx, edx
mov dword [eax], 0x12900
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + eax*4 - 0x8c]
mov eax, dword [ebp - 4]
add ecx, 0x7801
cmp eax, ecx
setle dl
xor ecx, ecx
imul eax, edx, 0x841a
cmp eax, 0x12900
setne cl
mov dword [ebp - 0x18], ecx
lea ecx, [ebp - 0xe8]
call fcn.0040fe33
xor eax, eax
mov ecx, dword [ebp - 0x1c]
cmp dword [ebp + ecx*4 - 0x8c], eax
jne 0x413414
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 2
jle 0x4132dc
lea eax, [ebp - 0xb8]
mov dword [ebp - 0x14], 0xdd8fb8ce
push eax
lea ecx, [ebp - 0xd0]
call fcn.00413fda
pop ecx
call fcn.00412c05
push dword [ebp - 0xb8]
mov dword [ebp - 0x44], edi
lea ecx, [ebp - 0xfc]
push ecx
mov dword [ebp - 0x50], 0x188753e1
lea ecx, [ebp - 0x10c]
mov dword [ebp - 0xc4], 7
xor eax, eax
mov dword [ebp - 0x9c], 0x9986e3e4
xorps xmm0, xmm0
push ecx
mov dword [ebp - 0x70], 0xbf889e02
lea ecx, [ebp - 0x64]
mov dword [ebp - 0xb0], 0x2206dd2c
mov dword [ebp - 0x24], 0xa2ef703c
push eax
movdqu xmmword [ebp - 0x10c], xmm0
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
call fcn.004114f4
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x78], 0xbf5cbf79
push eax
lea eax, [ebp - 0xc4]
mov dword [ebp - 0xac], edi
push eax
lea eax, [ebp - 0xb0]
mov dword [ebp - 0x7c], 0x88fefd6e
push eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x78]
push eax
lea edx, [ebp - 0x44]
lea ecx, [ebp - 0x64]
call fcn.00412abe
xor eax, eax
mov dword [ebp - 0x24], 3
add esp, 0x24
cmp dword [ebp - 0x24], eax
jl 0x4135e7
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x34], ecx
xor edx, edx
mov dword [ebp - 0x30], 0xffffffff
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x30]
test ecx, ecx
mov ecx, dword [ebp - 0x30]
setle dl
cmp edx, 0xffffffff
sbb edx, edx
neg edx
inc edx
neg edx
sbb edx, edx
xor ebx, ebx
inc edx
cmp edx, ecx
mov ecx, dword [ebp - 0x44]
sete bl
xor edx, edx
cmp ebx, ecx
setne dl
xor ebx, ebx
add dword [ebp - 0x30], edx
mov edi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x64]
mov esi, dword [ebp - 0x64]
mov ecx, dword [ecx + edx*4]
mov edx, dword [ebp - 0x44]
mov dword [esi + edi*4], ecx
imul edx, dword [esi + edi*4]
mov ecx, dword [ebp - 0x30]
cmp edx, ecx
mov ecx, dword [ebp - 0x48]
setne bl
xor edx, edx
cmp ebx, ecx
mov ecx, dword [ebp - 0x48]
setl dl
mov dword [ebp - 0x18], edx
xor edx, edx
cmp dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x34]
sete dl
mov dword [ebp - 0x48], edx
cmp dword [ecx + 8], eax
je 0x413593
mov ecx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x24]
xor ebx, ebx
mov ecx, dword [ebp - 0x50]
mov esi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x30]
add edx, ecx
mov ecx, dword [ebp - 0x78]
cmp ecx, edx
setl bl
xor ecx, ecx
cmp ebx, 0x57094d04
setne cl
xor edx, edx
cmp ecx, 0xffffffff
mov ecx, dword [ebp - 0x30]
setle dl
xor ebx, ebx
cmp edx, ecx
mov ecx, dword [ebp - 0x70]
setne bl
xor edx, edx
cmp ebx, ecx
mov ecx, dword [ebp - 0x64]
setne dl
mov dword [ecx + esi*4], edx
dec dword [ebp - 0x24]
jns 0x413506
xor edi, edi
inc edi
lea ecx, [ebp - 0x64]
call fcn.0040fe33
mov eax, dword [ebp - 0xd0]
lea ecx, [ebp - 0xd0]
mov dword [eax + 4], 0xc
call fcn.0040fe33
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0xb
jne 0x413214
mov dword [ebp - 0x20], 0x8a61928c
xor eax, eax
mov dword [ebp - 0x28], 0x9867f5d1
mov dword [ebp - 4], 9
mov dword [ebp - 0x18], 0x1f9f8041
mov dword [ebp - 0x20], eax
jmp 0x413779
mov dword [ebp - 8], 0x580849f8
mov dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 4], 0xfffffff9
mov dword [ebp - 0x14], 2
mov dword [ebp - 4], eax
jmp 0x413669
mov ecx, dword [ebp - 4]
mov dword [ebp + ecx*4 - 0x2c], 0x3099cfe0
inc dword [ebp - 4]
cmp dword [ebp - 4], edi
jl 0x41365b
mov dword [ebp - 8], eax
jmp 0x41376d
mov dword [ebp - 0x10], 0xfffffff9
mov dword [ebp - 0x34], 0x509b
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], eax
jl 0x41376a
mov dword [ebp - 4], 0x49e3c8d3
mov ecx, dword [ebp - 8]
mov ecx, dword [ebp + ecx*4 - 0x2c]
mov ecx, dword [ebp - 8]
mov ecx, dword [ebp + ecx*4 - 0x2c]
mov ecx, dword [ebp - 8]
mov ecx, dword [ebp + ecx*4 - 0x2c]
mov ecx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 8]
mov ecx, dword [ebp - 8]
cmp dword [ebp + ecx*4 - 0x2c], eax
je 0x4136c1
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x10]
xor edx, edx
cmp ecx, edi
setle dl
add edx, dword [ebp - 0x18]
mov dword [ebp - 4], edx
xor edx, edx
mov ecx, dword [ebp - 4]
cmp ecx, 0x31defcec
setle dl
add edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0x20]
neg edx
sbb edx, edx
inc edx
mov dword [ebp - 0x28], edx
mov ecx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 4], ecx
mov esi, dword [ebp - 4]
sub esi, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x14]
neg esi
sbb esi, esi
xor edx, edx
inc esi
cmp esi, ecx
setge dl
xor ebx, ebx
mov dword [ebp - 4], edx
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
cmp edx, ecx
setle bl
cmp ebx, dword [ebp - 0x2c]
jne 0x41372a
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ebp + ecx*4 - 0x2c]
mov ecx, dword [ebp - 8]
xor ebx, ebx
mov ecx, dword [ebp + ecx*4 - 0x2c]
test ecx, ecx
mov ecx, dword [ebp - 8]
setne bl
mov edx, dword [ebp + ecx*4 - 0x2c]
xor ecx, ecx
cmp ebx, 8
setle cl
sub edx, ecx
sub edx, dword [ebp - 0x2c]
mov dword [ebp - 4], edx
mov byte [ebp - 0x36], al
cmp byte [ebp - 0x36], 0
je 0x413761
push eax
call dword [sym.imp.USER32.dll_CharNextW]
xor eax, eax
dec dword [ebp - 0x10]
jns 0x413693
inc dword [ebp - 8]
cmp dword [ebp - 8], eax
jle 0x413676
inc dword [ebp - 0x20]
cmp dword [ebp - 0x20], 0x11
jl 0x41363a
mov dword [ebp - 4], 0xb
jmp 0x41385c
mov dword [ebp - 0x18], 0x94ae9822
mov dword [ebp - 0x10], eax
jmp 0x4137ac
mov ecx, dword [ebp - 0x10]
mov dword [ebp + ecx*4 - 0xa8], 0xaa9b2235
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 2
jl 0x41379b
mov dword [ebp - 0x28], eax
jmp 0x413850
mov dword [ebp - 0x34], 0xffffffff
mov dword [ebp - 0x14], 0xb1ec
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], eax
jmp 0x413848
mov byte [ebp - 0x38], al
cmp byte [ebp - 0x38], 0
je 0x4137e9
push 0x191a
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
xor eax, eax
mov ecx, dword [ebp - 0x34]
xor edx, edx
mov ecx, dword [ebp - 0x28]
mov esi, dword [ebp + ecx*4 - 0xa8]
mov ecx, dword [ebp - 0x14]
cmp ecx, edi
mov ecx, dword [ebp - 0x28]
setg dl
imul esi, edx
xor edx, edx
cmp esi, ecx
setl dl
xor ebx, ebx
imul ecx, edx, 0xe3b6
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x28]
mov ecx, dword [ebp + ecx*4 - 0xa8]
mov edx, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0x28]
add edx, 0xffffd006
cmp edx, ecx
setge bl
mov dword [ebp - 0x18], ebx
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x18], edi
inc dword [ebp - 0x20]
cmp dword [ebp - 0x20], edi
jle 0x4137d0
inc dword [ebp - 0x28]
cmp dword [ebp - 0x28], edi
jle 0x4137ba
dec dword [ebp - 4]
cmp dword [ebp - 4], 0xffffffed
jg 0x41378f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret