Function at 0x10020c30
Capabilities:
Access peb ldr_data
Get keyboard layout
Get number of processors
Get process heap force flags
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1007b61c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24c
push ebx
push ebp
push esi
push edi
push fcn.100034a0
push fcn.10003480
push 0x64
push 4
lea eax, [esp + 0xd8]
push eax
call fcn.100697e1
mov edx, dword [0x10098a04]
xor ebx, ebx
mov esi, 1
mov ecx, 0x10098a04
mov dword [esp + 0x264], ebx
mov dword [esp + 0x48], 0x10
mov dword [esp + 0x20], esi
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x18], eax
mov eax, dword [0x10098a04]
mov ecx, 0x10098a04
mov byte [esp + 0x264], 1
call dword [eax + 0xc]
lea ebp, [eax + 0x10]
mov dword [esp + 0x1c], ebp
push 0x18
push str.keyboard_layoutpreload_
lea ecx, [esp + 0x20]
mov byte [esp + 0x26c], 2
call fcn.100048d0
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x28]
push ecx
push edx
push SysReAllocStringLen
mov dword [esp + 0x3c], esi
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x10020f52
mov dword [esp + 0x14], 0x100968e0
lea esi, [esp + 0xc8]
jmp 0x10020d10
mov esi, dword [esp + 0x4c]
lea ecx, [ecx]
cmp dword [esp + 0x24], ebx
jne 0x10020f52
mov ecx, dword [esp + 0x20]
xor eax, eax
mov dword [esp + 0x51], eax
push ecx
mov dword [esp + 0x59], eax
lea edx, [esp + 0x54]
mov dword [esp + 0x5d], eax
push 0x100827ec
push edx
mov byte [esp + 0x5c], bl
mov word [esp + 0x69], ax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x38]
push edx
push ebx
lea eax, [esp + 0x60]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x10020dad
mov byte [esp + 0x60], bl
xor eax, eax
mov ecx, 0x18
lea edi, [esp + 0x61]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x60]
push edx
stosb byte es:[edi], al
call dword [sym.imp.USER32.dll_GetKeyboardLayoutNameA]
test eax, eax
je 0x10020f52
mov dword [esp + 0x24], 1
xor eax, eax
mov edi, edi
mov cl, byte [esp + eax + 0x60]
mov byte [esp + eax + 0x34], cl
inc eax
cmp cl, bl
jne 0x10020da0
push 0x32
push str.SystemCurrentControlSetControlKeyboard_Layouts_
lea ecx, [esp + 0x24]
call fcn.100048d0
lea eax, [esp + 0x34]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10020dc4
sub eax, edx
push eax
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x24]
call fcn.1000cde0
mov ecx, esi
add esi, 4
lea eax, [esp + 0x34]
mov dword [esp + 0x4c], esi
lea esi, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x10020df0
sub eax, esi
push eax
lea edx, [esp + 0x38]
push edx
call fcn.100048d0
mov ebp, dword [esp + 0x1c]
lea eax, [esp + 0x2c]
push eax
push ebp
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x10020ef8
push 0x50
call fcn.10067994
add esp, 4
lea ecx, [esp + 0x44]
push ecx
mov esi, eax
mov eax, dword [esp + 0x30]
push esi
lea edx, [esp + 0x38]
push edx
push ebx
push str.IME_File
push eax
mov dword [esp + 0x5c], 0x50
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x10020e71
lea eax, [esp + 0x34]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10020e60
sub eax, edx
push eax
lea ecx, [esp + 0x38]
push ecx
jmp 0x10020edb
cmp dword [esp + 0x24], ebx
je 0x10020ec0
cmp esi, ebx
jne 0x10020e97
xor eax, eax
push eax
push esi
mov ecx, 0x10096a70
call fcn.100048d0
push esi
call fcn.10069196
add esp, 4
jmp 0x10020f21
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10020ea0
sub eax, edx
push eax
push esi
mov ecx, 0x10096a70
call fcn.100048d0
push esi
call fcn.10069196
add esp, 4
jmp 0x10020f21
cmp esi, ebx
jne 0x10020ec8
xor eax, eax
jmp 0x10020ed9
mov eax, esi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10020ed0
sub eax, edx
push eax
push esi
mov edi, dword [esp + 0x1c]
mov ecx, edi
call fcn.100048d0
add edi, 4
push esi
mov dword [esp + 0x18], edi
call fcn.10069196
add esp, 4
jmp 0x10020f21
lea eax, [esp + 0x34]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10020f00
mov esi, dword [esp + 0x14]
sub eax, edx
push eax
lea edx, [esp + 0x38]
push edx
mov ecx, esi
call fcn.100048d0
add esi, 4
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x28]
push ecx
push edx
inc eax
push SysReAllocStringLen
mov dword [esp + 0x2c], eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x10020d09
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x10]
mov byte [esp + 0x264], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10020f7f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x264], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10020fa4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push fcn.100034a0
push 0x64
push 4
lea eax, [esp + 0xd4]
push eax
mov dword [esp + 0x274], 0xffffffff
call fcn.100691f9
mov ecx, dword [esp + 0x25c]
pop edi
mov eax, 1
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret