Function at 0x4189cc
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x20
mov edi, dword [ebp + 8]
mov edx, dword [edi + 0x530]
test edx, edx
je 0x418a10
test byte [edi + 0x94], 4
jne 0x418a10
cmp dword [ebp + 0xc], 0
je 0x4189f9
mov eax, dword [edx + 0xc]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
cmp dword [ebp + 0x10], 0
je 0x418f99
mov eax, dword [edx + 0x10]
mov edx, dword [ebp + 0x10]
mov dword [edx], eax
jmp 0x418f99
cmp dword [0x4b0410], 0
jne 0x418a3b
push str.XKB_DEBUG
call sub.msvcrt.dll_getenv
pop ecx
test eax, eax
setne al
mov dword [0x4b0410], 1
movzx eax, al
mov dword [0x4b0400], eax
cmp dword [ebp + 0xc], 0
je 0x418a4a
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 0
cmp dword [ebp + 0x10], 0
je 0x418a59
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
mov eax, dword [edi + 0x530]
test eax, eax
mov esi, eax
jne 0x418c93
push 0x64
push 1
call sub.msvcrt.dll_calloc
mov esi, eax
pop eax
xor eax, eax
test esi, esi
pop edx
je 0x418f9e
or dword [esi + 4], 0x12
mov eax, dword [edi + 4]
mov dword [edi + 0x530], esi
mov dword [eax + 0x20], 0x418995
push str._XKB_OPTIONS_ENABLE
call sub.msvcrt.dll_getenv
mov ebx, eax
test ebx, ebx
pop eax
je 0x418c74
push str._XKB_LATIN1_LOOKUP
call sub.msvcrt.dll_getenv
mov ebx, eax
test ebx, ebx
pop eax
je 0x418ae6
push 0x46addb
push ebx
call sub.msvcrt.dll_strcmp
pop edx
test eax, eax
pop ecx
je 0x418adc
push 0x46addf
push ebx
call sub.msvcrt.dll_strcmp
pop edx
test eax, eax
pop ecx
jne 0x418ae2
and dword [esi + 4], 0xfffffffe
jmp 0x418ae6
or dword [esi + 4], 1
push str._XKB_CONSUME_LOOKUP_MODS
call sub.msvcrt.dll_getenv
mov ebx, eax
test ebx, ebx
pop eax
je 0x418b23
push 0x46addb
push ebx
call sub.msvcrt.dll_strcmp
pop edx
test eax, eax
pop ecx
je 0x418b19
push 0x46addf
push ebx
call sub.msvcrt.dll_strcmp
pop edx
test eax, eax
pop ecx
jne 0x418b1f
and dword [esi + 4], 0xfffffffd
jmp 0x418b23
or dword [esi + 4], 2
push str._XKB_CONSUME_SHIFT_AND_LOCK
call sub.msvcrt.dll_getenv
mov ebx, eax
test ebx, ebx
pop eax
je 0x418b60
push 0x46addb
push ebx
call sub.msvcrt.dll_strcmp
pop edx
test eax, eax
pop ecx
je 0x418b56
push 0x46addf
push ebx
call sub.msvcrt.dll_strcmp
pop edx
test eax, eax
pop ecx
jne 0x418b5c
and dword [esi + 4], 0xfffffffb
jmp 0x418b60
or dword [esi + 4], 4
push str._XKB_IGNORE_NEW_KEYBOARDS
call sub.msvcrt.dll_getenv
mov ebx, eax
test ebx, ebx
pop eax
je 0x418b9d
push 0x46addb
push ebx
call sub.msvcrt.dll_strcmp
pop edx
test eax, eax
pop ecx
je 0x418b93
push 0x46addf
push ebx
call sub.msvcrt.dll_strcmp
pop edx
test eax, eax
pop ecx
jne 0x418b99
and dword [esi + 4], 0xfffffff7
jmp 0x418b9d
or dword [esi + 4], 8
push str._XKB_CONTROL_FALLBACK
call sub.msvcrt.dll_getenv
mov ebx, eax
test ebx, ebx
pop eax
je 0x418bda
push 0x46addb
push ebx
call sub.msvcrt.dll_strcmp
pop edx
test eax, eax
pop ecx
je 0x418bd0
push 0x46addf
push ebx
call sub.msvcrt.dll_strcmp
pop edx
test eax, eax
pop ecx
jne 0x418bd6
and dword [esi + 4], 0xffffffef
jmp 0x418bda
or dword [esi + 4], 0x10
push str._XKB_COMP_LED
call sub.msvcrt.dll_getenv
mov ebx, eax
test ebx, ebx
pop eax
je 0x418c31
push 0x46addb
push ebx
call sub.msvcrt.dll_strcmp
pop edx
test eax, eax
pop ecx
je 0x418c0d
push 0x46addf
push ebx
call sub.msvcrt.dll_strcmp
pop edx
test eax, eax
pop ecx
jne 0x418c16
and dword [esi + 4], 0xbfffffff
jmp 0x418c31
or dword [esi + 4], 0x40000000
cmp byte [ebx], 0
je 0x418c31
push 0
push ebx
push edi
call fcn.0041d8ae
mov dword [esi + 0x38], eax
add esp, 0xc
push str._XKB_COMP_FAIL_BEEP
call sub.msvcrt.dll_getenv
mov ebx, eax
test ebx, ebx
pop eax
je 0x418c74
push 0x46addb
push ebx
call sub.msvcrt.dll_strcmp
pop edx
test eax, eax
pop ecx
je 0x418c64
push 0x46addf
push ebx
call sub.msvcrt.dll_strcmp
pop ecx
test eax, eax
pop ebx
jne 0x418c6d
and dword [esi + 4], 0x7fffffff
jmp 0x418c74
or dword [esi + 4], 0x80000000
cmp dword [esi + 0x38], 0
jne 0x418c93
test byte [esi + 7], 0x40
je 0x418c93
push 0
push 0x46ae68
push edi
call fcn.0041d8ae
mov dword [esi + 0x38], eax
add esp, 0xc
xor eax, eax
test byte [edi + 0x94], 4
jne 0x418ca7
cmp dword [edi + 0xa0], 0
je 0x418cac
mov eax, 1
xor ecx, ecx
test eax, eax
setne al
xor edx, edx
cmp dword [ebp + 0xc], 0
sete dl
test eax, edx
je 0x418cc8
cmp dword [ebp + 0x10], 0
jne 0x418cc8
mov cl, 1
test ecx, ecx
jne 0x418ce4
cmp dword [0x4b03f0], 0
jne 0x418ce4
push str.XKB_DISABLE
call sub.msvcrt.dll_getenv
pop edx
test eax, eax
je 0x418d25
mov eax, dword [edi + 0x4d0]
test eax, eax
je 0x418cf2
push edi
call dword [eax]
pop ebx
or dword [edi + 0x94], 4
mov eax, dword [edi + 0x4d0]
test eax, eax
je 0x418d08
push edi
call dword [eax + 4]
pop ecx
cmp dword [0x4b0400], 0
je 0x418f1d
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push str.XKEYBOARD_extension_disabled_or_missing_n
jmp 0x418d77
push str.XKEYBOARD
push edi
call fcn.0041cf60
mov ebx, eax
test ebx, ebx
pop eax
mov eax, dword [edi + 0x4d0]
pop edx
jne 0x418d83
test eax, eax
je 0x418d46
push edi
call dword [eax]
pop ebx
or dword [edi + 0x94], 4
mov eax, dword [edi + 0x4d0]
test eax, eax
je 0x418d5c
push edi
call dword [eax + 4]
pop ecx
cmp dword [0x4b0400], 0
je 0x418f1d
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push str.XKEYBOARD_extension_not_present_n
call sub.msvcrt.dll_fputs
pop eax
pop edx
jmp 0x418f1d
mov dword [esi + 8], ebx
test eax, eax
je 0x418d8e
push edi
call dword [eax]
pop eax
mov eax, dword [edi + 0x6c]
add eax, 8
cmp eax, dword [edi + 0x70]
jbe 0x418da0
push edi
call fcn.004130cb
pop ecx
mov eax, dword [edi + 0x6c]
mov dword [edi + 0x64], eax
mov byte [eax], 0
mov edx, dword [esi + 8]
add dword [edi + 0x6c], 8
inc dword [edi + 0x60]
mov edx, dword [edx + 4]
mov word [eax + 2], 2
mov byte [eax + 1], 0
mov byte [eax], dl
lea edx, [ebp - 0x2c]
mov word [eax + 4], 1
mov word [eax + 6], 0
push 0
push 0
push edx
push edi
call fcn.00412ddc
add esp, 0x10
test eax, eax
je 0x418ded
cmp byte [ebp - 0x2b], 0
jne 0x418f21
cmp dword [0x4b0400], 0
je 0x418e1a
movzx eax, word [ebp - 0x22]
push eax
movzx eax, word [ebp - 0x24]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0
push 1
add eax, 0x40
push str.XKEYBOARD_version_mismatch__want__d._02d__got__d._02d__n
push eax
call sub.msvcrt.dll_fprintf
add esp, 0x18
cmp dword [ebp - 0x24], 0x410000
jne 0x418ede
cmp dword [0x4b0400], 0
je 0x418e45
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push str.Trying_to_fall_back_to_version_0.65...
call sub.msvcrt.dll_fputs
pop eax
pop edx
mov eax, dword [edi + 0x6c]
add eax, 8
cmp eax, dword [edi + 0x70]
jbe 0x418e57
push edi
call fcn.004130cb
pop eax
mov eax, dword [edi + 0x6c]
lea ecx, [ebp - 0x2c]
mov dword [edi + 0x64], eax
mov byte [eax], 0
mov edx, dword [esi + 8]
add dword [edi + 0x6c], 8
inc dword [edi + 0x60]
mov edx, dword [edx + 4]
mov word [eax + 2], 2
mov byte [eax + 1], 0
mov byte [eax], dl
mov word [eax + 4], 0
mov word [eax + 6], 0x41
push 0
push 0
push ecx
push edi
call fcn.00412ddc
add esp, 0x10
test eax, eax
je 0x418ec0
cmp byte [ebp - 0x2b], 0
je 0x418ec0
cmp dword [0x4b0400], 0
je 0x418f21
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push str.succeeded_n
call sub.msvcrt.dll_fputs
pop ecx
pop eax
jmp 0x418f21
cmp dword [0x4b0400], 0
je 0x418ede
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push str.failed_n
call sub.msvcrt.dll_fputs
pop eax
pop edx
or dword [edi + 0x94], 4
mov eax, dword [edi + 0x4d0]
test eax, eax
je 0x418ef4
push edi
call dword [eax + 4]
pop eax
mov eax, dword [edi + 0x7c]
test eax, eax
je 0x418eff
push edi
call eax
pop eax
cmp dword [ebp + 0xc], 0
je 0x418f0e
movzx eax, word [ebp - 0x24]
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
cmp dword [ebp + 0x10], 0
je 0x418f1d
movzx eax, word [ebp - 0x22]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
xor eax, eax
jmp 0x418f9e
mov eax, dword [edi + 0x4d0]
test eax, eax
je 0x418f30
push edi
call dword [eax + 4]
pop eax
movzx edx, word [ebp - 0x24]
movzx eax, word [ebp - 0x22]
cmp dword [ebp + 0xc], 0
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], eax
je 0x418f49
mov ecx, dword [ebp + 0xc]
mov dword [ecx], edx
cmp dword [ebp + 0x10], 0
je 0x418f54
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
cmp dword [0x4b0400], 0
je 0x418f7d
movzx eax, word [ebp - 0x22]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push edx
push 0
add eax, 0x40
push 1
push str.XKEYBOARD__version__d._02d__d._02d__OK__n
push eax
call sub.msvcrt.dll_fprintf
add esp, 0x18
push 0x418fa6
push dword [ebx + 8]
push edi
call fcn.0041d30d
mov eax, dword [edi + 0x7c]
add esp, 0xc
test eax, eax
je 0x418f99
push edi
call eax
pop ebx
mov eax, 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret