Function at 0x4c7bf400
Capabilities:
Get file size
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
push edi
xor edi, edi
cmp dword [0x4c7de44c], edi
jne 0x4c7bf43d
push 0x4c7de658
push 3
push edi
push 0x4c782700
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4c7bf4f7
mov dword [0x4c7de44c], 1
mov edx, dword [0x4c7de658]
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x10]
push ecx
push edi
push edi
push 0x4c784fac
mov ebx, 4
push edx
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0xc], ebx
call esi
test eax, eax
je 0x4c7bf482
mov dword [ebp - 0x10], 2
mov edx, dword [0x4c7de658]
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x14]
push ecx
push edi
push edi
push 0x4c784f88
push edx
mov dword [ebp - 0xc], ebx
call esi
test eax, eax
je 0x4c7bf4a8
mov dword [ebp - 0x14], 5
mov edx, dword [0x4c7de658]
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 8]
push ecx
push edi
push edi
push 0x4c784f68
push edx
mov dword [ebp - 0xc], ebx
call esi
test eax, eax
je 0x4c7bf4ce
mov dword [ebp - 8], 1
mov edx, dword [0x4c7de658]
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 4]
push ecx
push edi
push edi
push 0x4c784f4c
push edx
mov dword [ebp - 0xc], ebx
call esi
test eax, eax
je 0x4c7bf500
mov edx, 1
mov dword [ebp - 4], edx
jmp 0x4c7bf503
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret 4
mov edx, dword [ebp - 4]
cmp dword [ebp - 0x10], edi
jne 0x4c7bf57a
mov eax, dword [ebp - 8]
cmp eax, edx
jae 0x4c7bf52a
mov dword [ebp - 0x18], 1
push eax
call fcn.4c7bf2d0
mov eax, dword [ebp - 8]
add eax, 1
cmp eax, dword [ebp - 4]
mov dword [ebp - 8], eax
jb 0x4c7bf516
mov eax, dword [0x4c7dc230]
cmp eax, 0xffffffff
je 0x4c7bf54e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
push eax
mov dword [0x4c7dc230], 0xffffffff
call fcn.4c7bf2d0
cmp dword [ebp - 0x18], edi
je 0x4c7bf56c
mov edx, dword [0x4c7de658]
push ebx
lea ecx, [ebp - 8]
push ecx
push ebx
push edi
push 0x4c784f68
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop esi
pop ebx
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x4c7dc230]
cmp ecx, 0xffffffff
je 0x4c7bf5a1
cmp dword [0x4c7de65c], edx
je 0x4c7bf5c0
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 4]
mov dword [0x4c7dc230], 0xffffffff
push edx
mov dword [0x4c7de65c], edx
call fcn.4c7bf360
mov ecx, eax
cmp ecx, 0xffffffff
mov dword [0x4c7dc230], ecx
je 0x4c7bf64e
mov edi, edi
mov eax, dword [ebp - 0x14]
mov edx, 0x100000
mul edx
mov ebx, eax
lea eax, [ebp - 0x24]
push eax
push ecx
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], edi
mov esi, edx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x4c7bf64e
mov edi, dword [ebp - 0x20]
test edi, edi
jl 0x4c7bf659
mov edx, dword [ebp - 0x24]
jg 0x4c7bf5f3
test edx, edx
jbe 0x4c7bf659
mov ecx, dword [ebp + 8]
xor eax, eax
add ecx, edx
adc eax, edi
cmp eax, esi
jl 0x4c7bf659
jg 0x4c7bf606
cmp ecx, ebx
jbe 0x4c7bf659
mov eax, 1
add dword [ebp - 4], eax
mov dword [ebp - 0x1c], eax
mov eax, dword [0x4c7dc230]
cmp eax, 0xffffffff
je 0x4c7bf62c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4c7dc230], 0xffffffff
mov eax, dword [ebp - 4]
push eax
mov dword [0x4c7de65c], eax
call fcn.4c7bf360
mov ecx, eax
cmp ecx, 0xffffffff
mov dword [0x4c7dc230], ecx
je 0x4c7bf64e
xor edi, edi
jmp 0x4c7bf5c0
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
lea edx, [eax + ecx]
cmp edx, dword [ebp - 4]
ja 0x4c7bf68c
mov edi, 1
lea esp, [esp]
push eax
call fcn.4c7bf2d0
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
add eax, 1
lea edx, [eax + ecx]
cmp edx, dword [ebp - 4]
mov dword [ebp - 8], eax
jbe 0x4c7bf670
jmp 0x4c7bf68f
mov edi, dword [ebp - 0x18]
cmp dword [ebp - 0x1c], 0
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
je 0x4c7bf6b3
mov ecx, dword [0x4c7de658]
push 4
lea eax, [ebp - 4]
push eax
push 4
push 0
push 0x4c784f4c
push ecx
call esi
test edi, edi
je 0x4c7bf6ce
mov eax, dword [0x4c7de658]
push 4
lea edx, [ebp - 8]
push edx
push 4
push 0
push 0x4c784f68
push eax
call esi
push 2
xor ecx, ecx
push ecx
push ecx
mov ecx, dword [0x4c7dc230]
xor eax, eax
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
neg eax
pop esi
sbb eax, eax
pop ebx
neg eax
pop edi
mov esp, ebp
pop ebp
ret 4