Function at 0x561640
Capabilities:
Get common file path
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x128
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x34]
push 0x104
push eax
mov dword [esp + 0x30], 0x18
mov dword [esp + 0x24], 0
mov word [0x56ac14], 0x40
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x561dbe
mov edi, 0x567278
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x34]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x3e80
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
push 0x42
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalLock]
push eax
call ebx
mov esi, eax
test esi, esi
mov dword [esp + 0x14], esi
je 0x561dbe
push 0x3e80
push 0x42
call edi
push eax
call ebx
mov ebp, eax
test ebp, ebp
jne 0x56170b
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret
lea eax, [esp + 0x34]
push 0
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x561a11
mov edx, dword [0x56ac6c]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0x3e80
push ecx
push ebp
push 0x567258
push edx
call ebx
test eax, eax
je 0x561951
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x567398
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x34]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x18]
push edi
call dword [sym.imp.KERNEL32.dll__lopen]
mov esi, eax
cmp esi, 0xffffffff
je 0x561811
mov edi, dword [sym.imp.KERNEL32.dll__lread]
lea eax, [esp + 0x1c]
push 4
push eax
push esi
call edi
cmp eax, 4
mov eax, dword [esp + 0x1c]
jne 0x5617fc
test eax, eax
jne 0x5617fc
lea ecx, [esp + 0x1c]
push 4
push ecx
push esi
call edi
cmp dword [esp + 0x1c], 0x14
jne 0x5617e2
push 4
push 0x56ac18
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll__lclose]
mov esi, dword [esp + 0x14]
jmp 0x561962
push esi
mov dword [0x56ac18], 0
call dword [sym.imp.KERNEL32.dll__lclose]
mov esi, dword [esp + 0x14]
jmp 0x561962
push esi
mov dword [0x56ac18], eax
call dword [sym.imp.KERNEL32.dll__lclose]
mov esi, dword [esp + 0x14]
jmp 0x561962
mov edx, dword [0x56ac0c]
and edx, 0xffff
push edx
call fcn.005651f0
call fcn.005651fa
mov dword [esp + 0x14], eax
xor eax, eax
mov ax, word [0x56ac0a]
push eax
call fcn.005651f0
call fcn.005651fa
mov edx, dword [esp + 0x18]
mov dword [esp + 0x28], eax
shl eax, 0x10
or eax, edx
xor ecx, ecx
mov cx, word [0x56ac06]
cdq
xor eax, edx
push ecx
sub eax, edx
mov dword [0x56ac18], eax
call fcn.005651f0
call fcn.005651fa
mov edx, dword [0x56ac08]
mov dword [esp + 0x1c], eax
and edx, 0xffff
push edx
call fcn.005651f0
add esp, 0x10
call fcn.005651fa
mov edx, dword [esp + 0x10]
mov dword [esp + 0x20], eax
shl eax, 0x10
or eax, edx
mov ecx, dword [0x56ac6c]
cdq
xor eax, edx
sub eax, edx
mov edx, dword [0x56ac18]
add edx, eax
lea eax, [esp + 0x30]
push eax
push 0x567258
push ecx
mov dword [0x56ac18], edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x561940
mov eax, dword [0x56ac6c]
lea edx, [esp + 0x30]
push edx
push 0x567258
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x561917
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push edi
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push eax
call ebx
push edi
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push eax
call edi
push ebp
call esi
push eax
call ebx
push ebp
call esi
push eax
call edi
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret
mov ecx, dword [0x56ac18]
push 0xa
push ebp
push ecx
call fcn.00564f78
mov edx, dword [0x56ac6c]
add esp, 0xc
push 0x14
push ebp
push 1
push 0x567258
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueA]
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x14]
jmp 0x561962
mov edx, 0x567390
mov ecx, ebp
call fcn.005648e0
mov dword [0x56ac18], eax
mov edx, dword [0x56ac4c]
mov eax, dword [0x56ac6c]
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0x3e80
push ecx
push esi
push edx
push eax
call ebx
test eax, eax
je 0x5619eb
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push eax
call ebx
push esi
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push eax
call esi
push ebp
call edi
push eax
call ebx
push ebp
call edi
push eax
call esi
mov ecx, dword [0x56ae14]
or byte [0x56ac14], 8
mov eax, 0xe000
test eax, ecx
jne 0x5619db
mov edx, ecx
mov ecx, dword [0x56ad80]
or edx, eax
xor ecx, eax
mov dword [0x56ae14], edx
mov dword [0x56ad80], ecx
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x128
ret
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push ebp
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
or byte [0x56ac14], 4
jmp 0x561e37
mov ecx, dword [0x56ae14]
mov eax, 0xe000
test eax, ecx
jne 0x561a38
mov edx, ecx
mov ecx, dword [0x56ad80]
or edx, eax
xor ecx, eax
mov dword [0x56ae14], edx
mov dword [0x56ad80], ecx
mov edi, dword [sym.imp.KERNEL32.dll__lread]
lea ecx, [esp + 0x1c]
push 4
push ecx
push ebx
call edi
cmp eax, 4
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
jne 0x561af2
test eax, eax
jne 0x561af2
lea edx, [esp + 0x1c]
push 4
push edx
push ebx
call edi
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
cmp eax, 0x14
jne 0x561af0
push 4
push 0x56ac18
push ebx
call edi
mov dword [esp + 0x18], eax
lea eax, [esp + 0x28]
push 4
push eax
push ebx
call edi
mov ecx, dword [esp + 0x18]
push 8
add ecx, eax
push esi
push ebx
mov dword [esp + 0x24], ecx
call edi
add eax, dword [esp + 0x18]
cmp eax, 0x10
je 0x561b9d
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push eax
call esi
push ebp
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call edi
push eax
call esi
push ebx
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret
xor eax, eax
push 2
push 0
push ebx
mov dword [0x56ac18], eax
mov dword [esp + 0x28], 0xa
call dword [sym.imp.KERNEL32.dll__llseek]
cmp eax, 4
mov dword [esp + 0x28], eax
jb 0x561b1e
push 0
push 4
push ebx
call dword [sym.imp.KERNEL32.dll__llseek]
cmp dword [esp + 0x18], 4
je 0x561b9d
mov edx, dword [0x56ac6c]
lea ecx, [esp + 0x10]
push ecx
push ebp
push 0x567258
push edx
mov dword [esp + 0x20], 0x3e80
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
test eax, eax
je 0x561b8c
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push eax
call esi
push ebp
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call edi
push eax
call esi
push ebx
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret
mov edx, 0x567388
mov ecx, ebp
call fcn.005648e0
mov dword [0x56ac18], eax
mov ecx, dword [0x56ac4c]
mov edx, dword [0x56ac6c]
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x3e80
push eax
push esi
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
test eax, eax
push 0x10
push ebp
push ebx
je 0x561cc7
call edi
mov ecx, dword [esp + 0x1c]
sub ecx, 0x14
neg ecx
sbb ecx, ecx
and ecx, 0xffffffec
add ecx, 0x28
cmp eax, 0x10
mov dword [esp + 0x18], ecx
jne 0x561c3a
jmp 0x561bed
mov ecx, dword [esp + 0x18]
cmp ecx, dword [esp + 0x28]
jg 0x561c3a
mov eax, dword [ebp + 0xc]
mov esi, dword [0x56ac4c]
mov ecx, 3
mov edi, ebp
xor edx, edx
mov dword [esp + 0x20], eax
repe cmpsd dword [esi], dword es:[edi]
je 0x561c84
push 1
push eax
push ebx
call dword [sym.imp.KERNEL32.dll__llseek]
push 0x10
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll__lread]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
add ecx, eax
add edx, ecx
cmp eax, 0x10
mov dword [esp + 0x18], edx
je 0x561be9
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
or byte [0x56ac14], 8
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push eax
call esi
push ebp
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call edi
push eax
call esi
push ebx
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret
mov edx, dword [esp + 0x14]
push eax
push edx
push ebx
call dword [sym.imp.KERNEL32.dll__lread]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
inc eax
push ebp
mov dword [esp + 0x14], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call dword [sym.imp.KERNEL32.dll__lclose]
or byte [0x56ac14], 2
mov esi, dword [esp + 0x14]
jmp 0x561e31
call edi
mov ecx, dword [esp + 0x1c]
sub ecx, 0x14
neg ecx
sbb ecx, ecx
and ecx, 0xffffffec
add ecx, 0x28
cmp eax, 0x10
mov dword [esp + 0x18], ecx
jne 0x561dfa
jmp 0x561ced
mov ecx, dword [esp + 0x18]
cmp ecx, dword [esp + 0x28]
jg 0x561dfa
mov eax, dword [ebp + 0xc]
mov esi, dword [0x56ac4c]
mov ecx, 3
mov edi, ebp
xor edx, edx
mov dword [esp + 0x20], eax
repe cmpsd dword [esi], dword es:[edi]
je 0x561d43
push 1
push eax
push ebx
call dword [sym.imp.KERNEL32.dll__llseek]
push 0x10
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll__lread]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
add ecx, eax
add edx, ecx
cmp eax, 0x10
mov dword [esp + 0x18], edx
je 0x561ce9
jmp 0x561dfa
mov ecx, dword [esp + 0x10]
or byte [0x56ac14], 1
lea edx, [eax + 1]
cmp ecx, edx
je 0x561d72
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push eax
call edi
mov ecx, dword [esp + 0x14]
push ecx
jmp 0x561d9e
push eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll__lread]
mov ecx, dword [esp + 0x20]
cmp eax, ecx
jae 0x561dce
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push edx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push eax
call edi
mov eax, dword [esp + 0x14]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call esi
push eax
call edi
push ebp
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call dword [sym.imp.KERNEL32.dll__lclose]
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x128
ret
mov esi, dword [esp + 0x14]
mov edi, ebp
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x561df6
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push ebp
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor ebp, ebp
mov esi, dword [esp + 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll__lclose]
test ebp, ebp
je 0x561e31
test byte [0x56ac14], 1
jne 0x561e31
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push ebp
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor ebp, ebp
or byte [0x56ac14], 4
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalHandle]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x24]
push eax
dec edx
push ecx
mov ecx, esi
mov dword [esp + 0x18], edx
mov dword [esp + 0x28], edx
call fcn.005645d0
push esi
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, 0x20
mov edi, 0x56ab80
mov eax, dword [esp + 0x24]
mov esi, eax
add eax, 0x80
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x2c], eax
mov esi, 0x56ada4
mov eax, dword [esi]
test eax, eax
je 0x561ea5
push eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edx, dword [esi]
push edx
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x2c]
cmp byte [ecx], 0
je 0x561ec0
call fcn.00564950
lea ecx, [esp + 0x2c]
mov dword [esi], eax
call fcn.005642b0
jmp 0x561ecb
inc ecx
mov dword [esi], 0
mov dword [esp + 0x2c], ecx
add esi, 4
cmp esi, 0x56adf4
jl 0x561e89
mov eax, dword [esp + 0x24]
push eax
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push eax
call esi
mov ecx, dword [esp + 0x24]
push ecx
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push eax
call edi
test byte [0x56ac14], 1
je 0x562038
test ebp, ebp
je 0x562038
lea edx, [esp + 0x20]
lea eax, [esp + 0x24]
push edx
mov edx, dword [esp + 0x24]
push eax
mov ecx, ebp
call fcn.005645d0
push ebp
call ebx
push eax
call esi
push ebp
call ebx
push eax
call edi
mov ecx, dword [esp + 0x24]
mov ax, word [ecx + 0x5d]
cmp word [0x56abdd], ax
jb 0x561f43
mov word [0x56abdd], ax
mov ax, word [ecx + 0x5f]
cmp word [0x56abdf], ax
jb 0x561f56
mov word [0x56abdf], ax
xor eax, eax
mov ax, word [0x56abe1]
sub eax, 0x7bc
lea edx, [eax + eax*8]
lea eax, [eax + edx*8]
lea edx, [eax + eax*4]
xor eax, eax
mov ax, word [0x56abe3]
mov edi, eax
shl edi, 4
sub edi, eax
xor eax, eax
mov ax, word [0x56abe7]
lea edx, [edx + edi*2]
add edx, eax
xor eax, eax
mov dword [esp + 0x10], edx
mov ax, word [ecx + 0x61]
sub eax, 0x7bc
lea edi, [eax + eax*8]
lea eax, [eax + edi*8]
lea edi, [eax + eax*4]
xor eax, eax
mov ax, word [ecx + 0x63]
mov ebp, eax
shl ebp, 4
sub ebp, eax
lea eax, [edi + ebp*2]
xor edi, edi
mov di, word [ecx + 0x67]
add eax, edi
cmp edx, eax
mov dword [esp + 0x20], eax
jle 0x561fe2
mov edx, dword [ecx + 0x61]
mov dword [0x56abe1], edx
mov eax, dword [ecx + 0x65]
mov dword [0x56abe5], eax
mov edx, dword [ecx + 0x69]
mov dword [0x56abe9], edx
mov eax, dword [ecx + 0x6d]
mov dword [0x56abed], eax
mov eax, dword [ecx + 0x74]
mov edx, dword [0x56abf4]
cmp edx, eax
jb 0x561ff4
mov dword [0x56abf4], eax
mov eax, dword [ecx + 0x78]
mov edx, dword [0x56abf8]
cmp edx, eax
jb 0x562006
mov dword [0x56abf8], eax
mov ax, word [ecx + 0x71]
mov edi, dword [0x56aafc]
movsx edx, ax
shl edx, 6
cmp word [edx + edi + 0x28], 0
jne 0x562024
mov word [0x56abf1], ax
push ecx
call ebx
push eax
call esi
mov eax, dword [esp + 0x24]
push eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x128
ret