Function at 0x4dc640
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 [0x4e5c14], 0x40
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4dcdbe
mov edi, 0x4e2278
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 0x4dcdbe
push 0x3e80
push 0x42
call edi
push eax
call ebx
mov ebp, eax
test ebp, ebp
jne 0x4dc70b
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 0x4dca11
mov edx, dword [0x4e5c6c]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0x3e80
push ecx
push ebp
push 0x4e2258
push edx
call ebx
test eax, eax
je 0x4dc951
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x4e2398
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 0x4dc811
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 0x4dc7fc
test eax, eax
jne 0x4dc7fc
lea ecx, [esp + 0x1c]
push 4
push ecx
push esi
call edi
cmp dword [esp + 0x1c], 0x14
jne 0x4dc7e2
push 4
push 0x4e5c18
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll__lclose]
mov esi, dword [esp + 0x14]
jmp 0x4dc962
push esi
mov dword [0x4e5c18], 0
call dword [sym.imp.KERNEL32.dll__lclose]
mov esi, dword [esp + 0x14]
jmp 0x4dc962
push esi
mov dword [0x4e5c18], eax
call dword [sym.imp.KERNEL32.dll__lclose]
mov esi, dword [esp + 0x14]
jmp 0x4dc962
mov edx, dword [0x4e5c0c]
and edx, 0xffff
push edx
call fcn.004e01f0
call fcn.004e01fa
mov dword [esp + 0x14], eax
xor eax, eax
mov ax, word [0x4e5c0a]
push eax
call fcn.004e01f0
call fcn.004e01fa
mov edx, dword [esp + 0x18]
mov dword [esp + 0x28], eax
shl eax, 0x10
or eax, edx
xor ecx, ecx
mov cx, word [0x4e5c06]
cdq
xor eax, edx
push ecx
sub eax, edx
mov dword [0x4e5c18], eax
call fcn.004e01f0
call fcn.004e01fa
mov edx, dword [0x4e5c08]
mov dword [esp + 0x1c], eax
and edx, 0xffff
push edx
call fcn.004e01f0
add esp, 0x10
call fcn.004e01fa
mov edx, dword [esp + 0x10]
mov dword [esp + 0x20], eax
shl eax, 0x10
or eax, edx
mov ecx, dword [0x4e5c6c]
cdq
xor eax, edx
sub eax, edx
mov edx, dword [0x4e5c18]
add edx, eax
lea eax, [esp + 0x30]
push eax
push 0x4e2258
push ecx
mov dword [0x4e5c18], edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x4dc940
mov eax, dword [0x4e5c6c]
lea edx, [esp + 0x30]
push edx
push 0x4e2258
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x4dc917
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 [0x4e5c18]
push 0xa
push ebp
push ecx
call fcn.004dff78
mov edx, dword [0x4e5c6c]
add esp, 0xc
push 0x14
push ebp
push 1
push 0x4e2258
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 0x4dc962
mov edx, 0x4e2390
mov ecx, ebp
call fcn.004df8e0
mov dword [0x4e5c18], eax
mov edx, dword [0x4e5c4c]
mov eax, dword [0x4e5c6c]
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0x3e80
push ecx
push esi
push edx
push eax
call ebx
test eax, eax
je 0x4dc9eb
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 [0x4e5e14]
or byte [0x4e5c14], 8
mov eax, 0xe000
test eax, ecx
jne 0x4dc9db
mov edx, ecx
mov ecx, dword [0x4e5d80]
or edx, eax
xor ecx, eax
mov dword [0x4e5e14], edx
mov dword [0x4e5d80], 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 [0x4e5c14], 4
jmp 0x4dce37
mov ecx, dword [0x4e5e14]
mov eax, 0xe000
test eax, ecx
jne 0x4dca38
mov edx, ecx
mov ecx, dword [0x4e5d80]
or edx, eax
xor ecx, eax
mov dword [0x4e5e14], edx
mov dword [0x4e5d80], 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 0x4dcaf2
test eax, eax
jne 0x4dcaf2
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 0x4dcaf0
push 4
push 0x4e5c18
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 0x4dcb9d
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 [0x4e5c18], eax
mov dword [esp + 0x28], 0xa
call dword [sym.imp.KERNEL32.dll__llseek]
cmp eax, 4
mov dword [esp + 0x28], eax
jb 0x4dcb1e
push 0
push 4
push ebx
call dword [sym.imp.KERNEL32.dll__llseek]
cmp dword [esp + 0x18], 4
je 0x4dcb9d
mov edx, dword [0x4e5c6c]
lea ecx, [esp + 0x10]
push ecx
push ebp
push 0x4e2258
push edx
mov dword [esp + 0x20], 0x3e80
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
test eax, eax
je 0x4dcb8c
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, 0x4e2388
mov ecx, ebp
call fcn.004df8e0
mov dword [0x4e5c18], eax
mov ecx, dword [0x4e5c4c]
mov edx, dword [0x4e5c6c]
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 0x4dccc7
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 0x4dcc3a
jmp 0x4dcbed
mov ecx, dword [esp + 0x18]
cmp ecx, dword [esp + 0x28]
jg 0x4dcc3a
mov eax, dword [ebp + 0xc]
mov esi, dword [0x4e5c4c]
mov ecx, 3
mov edi, ebp
xor edx, edx
mov dword [esp + 0x20], eax
repe cmpsd dword [esi], dword es:[edi]
je 0x4dcc84
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 0x4dcbe9
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
or byte [0x4e5c14], 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 [0x4e5c14], 2
mov esi, dword [esp + 0x14]
jmp 0x4dce31
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 0x4dcdfa
jmp 0x4dcced
mov ecx, dword [esp + 0x18]
cmp ecx, dword [esp + 0x28]
jg 0x4dcdfa
mov eax, dword [ebp + 0xc]
mov esi, dword [0x4e5c4c]
mov ecx, 3
mov edi, ebp
xor edx, edx
mov dword [esp + 0x20], eax
repe cmpsd dword [esi], dword es:[edi]
je 0x4dcd43
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 0x4dcce9
jmp 0x4dcdfa
mov ecx, dword [esp + 0x10]
or byte [0x4e5c14], 1
lea edx, [eax + 1]
cmp ecx, edx
je 0x4dcd72
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 0x4dcd9e
push eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll__lread]
mov ecx, dword [esp + 0x20]
cmp eax, ecx
jae 0x4dcdce
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 0x4dcdf6
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 0x4dce31
test byte [0x4e5c14], 1
jne 0x4dce31
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 [0x4e5c14], 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.004df5d0
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, 0x4e5b80
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, 0x4e5da4
mov eax, dword [esi]
test eax, eax
je 0x4dcea5
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 0x4dcec0
call fcn.004df950
lea ecx, [esp + 0x2c]
mov dword [esi], eax
call fcn.004df2b0
jmp 0x4dcecb
inc ecx
mov dword [esi], 0
mov dword [esp + 0x2c], ecx
add esi, 4
cmp esi, 0x4e5df4
jl 0x4dce89
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 [0x4e5c14], 1
je 0x4dd038
test ebp, ebp
je 0x4dd038
lea edx, [esp + 0x20]
lea eax, [esp + 0x24]
push edx
mov edx, dword [esp + 0x24]
push eax
mov ecx, ebp
call fcn.004df5d0
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 [0x4e5bdd], ax
jb 0x4dcf43
mov word [0x4e5bdd], ax
mov ax, word [ecx + 0x5f]
cmp word [0x4e5bdf], ax
jb 0x4dcf56
mov word [0x4e5bdf], ax
xor eax, eax
mov ax, word [0x4e5be1]
sub eax, 0x7bc
lea edx, [eax + eax*8]
lea eax, [eax + edx*8]
lea edx, [eax + eax*4]
xor eax, eax
mov ax, word [0x4e5be3]
mov edi, eax
shl edi, 4
sub edi, eax
xor eax, eax
mov ax, word [0x4e5be7]
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 0x4dcfe2
mov edx, dword [ecx + 0x61]
mov dword [0x4e5be1], edx
mov eax, dword [ecx + 0x65]
mov dword [0x4e5be5], eax
mov edx, dword [ecx + 0x69]
mov dword [0x4e5be9], edx
mov eax, dword [ecx + 0x6d]
mov dword [0x4e5bed], eax
mov eax, dword [ecx + 0x74]
mov edx, dword [0x4e5bf4]
cmp edx, eax
jb 0x4dcff4
mov dword [0x4e5bf4], eax
mov eax, dword [ecx + 0x78]
mov edx, dword [0x4e5bf8]
cmp edx, eax
jb 0x4dd006
mov dword [0x4e5bf8], eax
mov ax, word [ecx + 0x71]
mov edi, dword [0x4e5afc]
movsx edx, ax
shl edx, 6
cmp word [edx + edi + 0x28], 0
jne 0x4dd024
mov word [0x4e5bf1], 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