Function at 0x103840c
Capabilities:
Identify system language via api
Query or enumerate registry value
Set registry value

Disassembly:
mov eax, 0x1040902
call fcn.0103cb58
sub esp, 0x160
mov eax, dword [0x104a0fc]
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0xd8], esi
xor ebx, ebx
mov dword [ebp - 0xac], ebx
mov dword [ebp - 0x9c], ebx
mov dword [ebp - 0xb0], ebx
mov dword [ebp - 0xa4], ebx
mov dword [ebp - 0xc8], ebx
mov dword [ebp - 0xa8], 0x40
mov dword [ebp - 0x58], ebx
push 0xf
pop ecx
xor eax, eax
lea edi, [ebp - 0x54]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 0xbc], ebx
mov dword [ebp - 0xec], ebx
mov dword [ebp - 0x100], 0x1006674
mov dword [ebp - 0xfc], 0x1006650
mov dword [ebp - 0xf8], 0x100662c
mov dword [ebp - 0xe0], 0x1006610
mov dword [ebp - 0x16c], ebx
mov dword [ebp - 0x168], ebx
xor eax, eax
lea edi, [ebp - 0x164]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xd4], ebx
xor edi, edi
inc edi
mov byte [ebp - 4], 1
mov ecx, esi
call fcn.01035c98
mov dword [ebp - 0xc8], eax
cmp eax, ebx
jne 0x1038583
lea eax, [ebp - 0xa8]
push eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0xec]
push eax
push ebx
push 0x1005d54
push dword [esi + 0x3e4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0xb4], eax
cmp eax, ebx
jne 0x1038560
cmp dword [ebp - 0xec], edi
jne 0x1038540
mov eax, dword [ebp - 0xa8]
shr eax, 1
mov word [ebp + eax*2 - 0x58], bx
push 0x1002e08
lea eax, [ebp - 0x58]
push eax
call fcn.010311c6
test eax, eax
jne 0x10385c4
mov dword [ebp - 0xa4], edi
jmp 0x10385c4
push 0xd
pop esi
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x108], esi
push 0x1042c20
lea eax, [ebp - 0x108]
jmp 0x1038c9f
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x114], eax
push 0x1042d04
lea eax, [ebp - 0x114]
jmp 0x1038c9f
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x154], eax
cmp eax, 0xffffffff
je 0x10385a8
lea ecx, [ebp - 0x138]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x10385b6
mov word [ebp - 0x12c], bx
mov word [ebp - 0x128], bx
push ebx
push ebx
push ebx
push edi
push 0xb07b
call fcn.01032880
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0xa0], ebx
push 4
pop edi
mov dword [ebp - 0xa8], edi
mov dword [ebp - 0xf0], edi
lea eax, [ebp - 0xa8]
push eax
lea eax, [ebp - 0xa0]
push eax
lea eax, [ebp - 0xf0]
push eax
push ebx
push 0x1005d44
push dword [esi + 0x3e8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0xb4], eax
cmp eax, ebx
jne 0x103862b
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x14c], eax
cmp word [ebp - 0xb8], ax
jne 0x1038671
or dword [ebp - 0xa0], 0xffffffff
mov dword [ebp - 0xa8], edi
lea eax, [ebp - 0xa8]
push eax
lea eax, [ebp - 0xa0]
push eax
lea eax, [ebp - 0xf0]
push eax
push ebx
push 0x1005d20
push dword [esi + 0x3e8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0xb4], eax
cmp eax, ebx
jne 0x103867b
cmp dword [ebp - 0xa0], ebx
jne 0x103867b
mov dword [ebp - 0xb0], 1
push ebx
call fcn.01033605
push eax
lea ecx, [ebp - 0xc0]
call fcn.01032b03
mov byte [ebp - 4], 2
push 3
lea eax, [ebp - 0x16c]
push eax
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0xc0]
push eax
mov ecx, esi
call fcn.010371e7
test eax, eax
jne 0x10386bd
mov dword [ebp - 0xa4], 1
cmp dword [ebp - 0xc8], ebx
jne 0x103872f
cmp dword [ebp - 0xa4], ebx
jne 0x10386d9
cmp dword [ebp - 0xb0], ebx
je 0x1038ace
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x140], eax
cmp eax, 0xffffffff
je 0x10386fe
lea ecx, [ebp - 0x138]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x103870c
mov word [ebp - 0x12c], bx
mov word [ebp - 0x128], bx
push ebx
push ebx
push ebx
push 1
push 0x11178
call fcn.01032880
cmp dword [ebp - 0xa4], ebx
jne 0x103872f
cmp dword [ebp - 0xb0], ebx
je 0x1038ace
lea eax, [ebp - 0x9c]
push eax
push 0x10071ec
push 1
push ebx
push 0x100717c
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov dword [ebp - 0xac], eax
cmp eax, ebx
jge 0x1038759
push eax
call fcn.0103c827
cmp dword [ebp - 0xc8], ebx
jne 0x103876d
cmp dword [ebp - 0xa4], ebx
je 0x1038859
mov dword [ebp - 0xc4], ebx
cmp dword [ebp - 0xc4], 3
jae 0x1038859
mov eax, dword [ebp - 0xc4]
push dword [ebp + eax*4 - 0x100]
lea ecx, [ebp - 0xe8]
call fcn.01007b57
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0xe4]
push eax
lea ecx, [ebp - 0xc0]
call fcn.010084dd
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xbc]
push ecx
push eax
push dword [ebp - 0x9c]
mov ecx, esi
call fcn.010374dc
mov edi, eax
mov dword [ebp - 0xac], edi
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0xe4]
cmp ecx, ebx
je 0x10387e9
call fcn.01008084
mov dword [ebp - 0xe4], ebx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0xe8]
cmp ecx, ebx
je 0x1038802
call fcn.01008084
mov dword [ebp - 0xe8], ebx
cmp edi, ebx
jl 0x103880e
cmp dword [ebp - 0xbc], ebx
je 0x103881f
push ebx
push 3
lea eax, [ebp - 0x100]
push eax
mov ecx, esi
call fcn.01037023
cmp edi, ebx
jge 0x1038829
push edi
call fcn.0103c827
cmp dword [ebp - 0xbc], ebx
je 0x103884b
mov dword [ebp - 0x11c], 0xc34f
push 0x10421cc
lea eax, [ebp - 0x11c]
jmp 0x1038c9f
inc dword [ebp - 0xc4]
push 4
pop edi
jmp 0x1038773
cmp dword [ebp - 0xb0], ebx
je 0x1038a06
mov dword [ebp - 0xa0], 1
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultUILanguage]
mov dword [ebp - 0x13c], eax
cmp word [ebp - 0xb8], ax
je 0x10389b7
push ebx
push dword [ebp - 0xb8]
call fcn.010336bd
push eax
lea ecx, [ebp - 0xd0]
call fcn.01032b03
mov byte [ebp - 4], 5
mov dword [ebp - 0xcc], ebx
cmp dword [ebp - 0xcc], 1
jae 0x103899c
mov eax, dword [ebp - 0xcc]
push dword [ebp + eax*4 - 0xe0]
lea ecx, [ebp - 0xdc]
call fcn.01007b57
mov byte [ebp - 4], 6
push eax
lea eax, [ebp - 0xf4]
push eax
lea ecx, [ebp - 0xd0]
call fcn.010084dd
mov byte [ebp - 4], 7
lea ecx, [ebp - 0xbc]
push ecx
push eax
push dword [ebp - 0x9c]
mov ecx, esi
call fcn.010374dc
mov dword [ebp - 0xac], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0xf4]
cmp ecx, ebx
je 0x103891e
call fcn.01008084
mov dword [ebp - 0xf4], ebx
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0xdc]
cmp ecx, ebx
je 0x1038937
call fcn.01008084
mov dword [ebp - 0xdc], ebx
cmp dword [ebp - 0xac], ebx
jl 0x1038947
cmp dword [ebp - 0xbc], ebx
je 0x1038991
mov dword [ebp - 0x98], ebx
push 0xf
pop ecx
xor eax, eax
lea edi, [ebp - 0x94]
rep stosd dword es:[edi], eax
movzx eax, word [ebp - 0xb8]
push eax
push 0x1005394
lea eax, [ebp - 0x98]
push eax
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0xc
lea eax, [ebp - 0x98]
push eax
push 1
lea eax, [ebp - 0xe0]
push eax
mov ecx, esi
call fcn.01037023
push 4
pop edi
inc dword [ebp - 0xcc]
jmp 0x10388aa
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0xd0]
cmp ecx, ebx
je 0x10389be
call fcn.01008084
mov dword [ebp - 0xd0], ebx
jmp 0x10389be
or dword [ebp - 0xa0], 0xffffffff
push edi
lea eax, [ebp - 0xa0]
push eax
push edi
push ebx
push 0x1005d20
push dword [esi + 0x3e8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 0xb4], eax
cmp eax, ebx
je 0x1038a06
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x118], eax
push 0x1042d04
lea eax, [ebp - 0x118]
jmp 0x1038c9f
mov eax, dword [ebp - 0x9c]
cmp eax, ebx
je 0x1038a1c
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x9c], ebx
push 3
lea eax, [ebp - 0x16c]
push eax
lea eax, [ebp - 0x100]
push eax
mov ecx, esi
call fcn.01035b74
push 0x1002e08
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
push eax
push 0x1002e08
push 1
push ebx
push 0x1005d54
push dword [esi + 0x3e4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 0xb4], eax
cmp eax, ebx
je 0x1038a86
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10c], eax
push 0x1042d04
lea eax, [ebp - 0x10c]
jmp 0x1038c9f
push edi
lea eax, [ebp - 0xb8]
push eax
push edi
push ebx
push 0x1005d44
push dword [esi + 0x3e8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 0xb4], eax
cmp eax, ebx
je 0x1038ace
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x110], eax
push 0x1042d04
lea eax, [ebp - 0x110]
jmp 0x1038c9f
mov eax, dword [esi + 0x3e8]
cmp eax, ebx
je 0x1038ae5
push eax
call dword [entry0]
mov dword [esi + 0x3e8], ebx
add esi, 0x3e4
mov eax, dword [esi]
cmp eax, ebx
je 0x1038afa
push eax
call dword [entry0]
mov dword [esi], ebx
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0xc0]
cmp ecx, ebx
je 0x1038b13
call fcn.01008084
mov dword [ebp - 0xc0], ebx
mov byte [ebp - 4], bl
cmp dword [ebp - 0xd4], ebx
je 0x1038bfb
mov ecx, dword [ebp - 0xd4]
call fcn.01008084
mov dword [ebp - 0xd4], ebx
jmp 0x1038bfb
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0xc8], ebx
jne 0x1038c17
cmp dword [ebp - 0xa4], ebx
jne 0x1038c17
cmp dword [ebp - 0xb0], ebx
je 0x1038c23
lea eax, [ebp - 0x138]
push eax
call fcn.010319b7
mov eax, dword [ebp - 0xac]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
call fcn.0103c70f
pop edi
pop esi
pop ebx
leave
ret
push eax
call sub.msvcrt.dll__CxxThrowException
int3