Function at 0x105e003
Capabilities:
Get common file path
Get file size
Query or enumerate registry value
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x74c
mov eax, dword [0x107fa78]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp dword [0x10821ec], ebx
mov dword [ebp - 0x728], eax
je 0x105e044
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [0x10821f0]
jg 0x105e55f
cmp dword [eax], 0xffffffff
jne 0x105e55f
push esi
push edi
xor eax, eax
lea ecx, [ebp - 0x73c]
push ecx
inc eax
push eax
push ebx
push 0x100a4a8
push SysReAllocString
mov dword [ebp - 0x73c], ebx
mov dword [ebp - 0x734], ebx
mov dword [ebp - 0x730], ebx
mov dword [0x10821ec], eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, 0x8000080
jne 0x105e1ad
lea eax, [ebp - 0x724]
push eax
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x738]
push eax
push ebx
push 0x100b964
push dword [ebp - 0x73c]
mov dword [ebp - 0x738], 1
mov dword [ebp - 0x724], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x105e151
cmp dword [ebp - 0x738], 1
jne 0x105e151
push ebx
push edi
push 3
push ebx
push ebx
push SysReAllocString
lea eax, [ebp - 0x108]
push eax
mov byte [ebp - 5], bl
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x72c], eax
je 0x105e126
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x105e109
xor eax, eax
push dword [ebp - 0x72c]
mov ecx, 0x7a120
cmp ecx, eax
sbb eax, eax
neg eax
mov dword [ebp - 0x730], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp dword [ebp - 0x730], ebx
push ebx
sete al
push edi
lea eax, [eax + eax + 2]
push eax
push ebx
push 1
push 0x40000000
lea eax, [ebp - 0x108]
push eax
call esi
mov ecx, dword [ebp - 0x728]
mov dword [ecx], eax
lea eax, [ebp - 0x724]
push eax
lea eax, [ebp - 0x734]
push eax
lea eax, [ebp - 0x738]
push eax
push ebx
push 0x100b948
push dword [ebp - 0x73c]
mov dword [ebp - 0x724], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x105e18f
cmp dword [ebp - 0x738], 4
je 0x105e195
mov dword [ebp - 0x734], ebx
movzx eax, word [ebp - 0x734]
push dword [ebp - 0x73c]
mov dword [0x10821f0], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x728]
cmp dword [eax], 0xffffffff
jne 0x105e3bb
mov eax, dword [0x10821f0]
cmp eax, ebx
jne 0x105e1cd
push 4
pop eax
mov dword [0x10821f0], eax
cmp dword [ebp + 0xc], eax
jg 0x105e3bb
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x105e3bb
lea eax, [ebp - 0x108]
push eax
call fcn.01056b9f
push dword [ebp + 0x10]
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.01048bad
test eax, eax
jl 0x105e3bb
push ebx
push edi
push 3
push ebx
push ebx
push SysReAllocString
lea eax, [ebp - 0x108]
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x72c], eax
je 0x105e263
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x105e246
xor eax, eax
push dword [ebp - 0x72c]
mov ecx, 0x7a120
cmp ecx, eax
sbb eax, eax
neg eax
mov dword [ebp - 0x730], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp dword [ebp - 0x730], ebx
push ebx
sete al
push edi
lea eax, [eax + eax + 2]
push eax
push ebx
push 1
mov dword [ebp - 0x724], eax
push 0x40000000
lea eax, [ebp - 0x108]
push eax
call esi
cmp eax, 0xffffffff
mov ecx, dword [ebp - 0x728]
mov dword [ecx], eax
jne 0x105e2f6
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x105e2f6
lea eax, [ebp - 0x20c]
push eax
call fcn.01056b9f
push 0x100b938
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.01048bad
test eax, eax
jl 0x105e2f6
push ebx
push edi
push dword [ebp - 0x724]
lea eax, [ebp - 0x20c]
push ebx
push 1
push 0x40000000
push eax
call esi
mov ecx, dword [ebp - 0x728]
mov dword [ecx], eax
mov eax, dword [ebp - 0x728]
cmp dword [eax], 0xffffffff
jne 0x105e3bb
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x105e3bb
lea eax, [ebp - 0x20c]
push eax
call fcn.01056b9f
push 0x100b92c
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.01048bad
test eax, eax
jl 0x105e3bb
push ebx
push edi
push 3
push ebx
push ebx
push SysReAllocString
lea eax, [ebp - 0x20c]
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x72c], eax
je 0x105e390
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x105e373
xor eax, eax
push dword [ebp - 0x72c]
mov ecx, 0x7a120
cmp ecx, eax
sbb eax, eax
neg eax
mov dword [ebp - 0x730], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp dword [ebp - 0x730], ebx
push ebx
sete al
push edi
lea eax, [eax + eax + 2]
push eax
push ebx
push 1
push 0x40000000
lea eax, [ebp - 0x20c]
push eax
call esi
mov ecx, dword [ebp - 0x728]
mov dword [ecx], eax
mov eax, dword [ebp - 0x728]
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x105e55d
cmp dword [ebp - 0x730], ebx
jne 0x105e3df
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x74c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push dword [0x10821f0]
movzx eax, word [ebp - 0x740]
push eax
movzx eax, word [ebp - 0x742]
push eax
movzx eax, word [ebp - 0x744]
push eax
movzx eax, word [ebp - 0x746]
push eax
movzx eax, word [ebp - 0x74a]
push eax
movzx eax, word [ebp - 0x74c]
push eax
push 0x100b8d0
mov edi, 0x104
lea eax, [ebp - 0x108]
push edi
push eax
call fcn.0104d758
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
add esp, 0x28
test eax, eax
jl 0x105e478
lea eax, [ebp - 0x108]
mov dword [ebp - 0x734], ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x105e455
push ebx
sub eax, edx
lea ecx, [ebp - 0x734]
push ecx
push eax
lea eax, [ebp - 0x108]
push eax
mov eax, dword [ebp - 0x728]
push dword [eax]
call esi
push 0x7f
lea eax, [ebp - 0x208]
push eax
call fcn.01056fbb
push edx
push eax
call fcn.01059462
call fcn.0105a1ae
push 0x103
lea ecx, [ebp - 0x518]
push ecx
push edx
push eax
call fcn.01059462
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
movzx eax, ax
mov dword [ebp - 0x72c], eax
push edi
lea eax, [ebp - 0x720]
push eax
call fcn.0105c511
test eax, eax
je 0x105e55d
push ebx
push 4
call fcn.01057146
test eax, eax
mov dword [ebp - 0x724], 0x100b8cc
jne 0x105e4e9
mov dword [ebp - 0x724], 0x100b8c8
lea eax, [ebp - 0x720]
push eax
lea eax, [ebp - 0x518]
push eax
movzx eax, word [ebp - 0x72c]
push eax
call fcn.0105df77
push eax
lea eax, [ebp - 0x208]
push eax
push dword [ebp - 0x724]
lea eax, [ebp - 0x310]
push 0x100b868
push edi
push eax
call fcn.0104d758
add esp, 0x24
test eax, eax
jl 0x105e55d
lea eax, [ebp - 0x310]
mov dword [ebp - 0x734], ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x105e53a
push ebx
sub eax, edx
lea ecx, [ebp - 0x734]
push ecx
push eax
lea eax, [ebp - 0x310]
push eax
mov eax, dword [ebp - 0x728]
push dword [eax]
call esi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.01047417
leave
ret 0xc