Function at 0x401339
Capabilities:
Query or enumerate registry value
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x428
push ebx
lea eax, [ebp - 0xc]
mov byte [ebp - 0x328], 0
push esi
push edi
push eax
push 0x401074
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40139a
lea eax, [ebp - 4]
lea ecx, [ebp - 0x328]
push eax
lea edx, [ebp - 0x10]
mov dword [ebp - 4], 0x104
mov dword [ebp - 0x10], 1
push ecx
push edx
push 0
push 0x40106c
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
lea eax, [ebp - 0xc]
push eax
mov byte [ebp - 0x224], bl
push 0x401040
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x401448
mov esi, 0x100
mov edi, 1
lea eax, [ebp - 4]
lea ecx, [ebp - 0x224]
push eax
lea edx, [ebp - 0x10]
push ecx
mov dword [ebp - 4], esi
push edx
mov dword [ebp - 0x10], edi
push ebx
push 0x401038
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push 0x401034
lea ecx, [ebp - 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [ebp - 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
sub esi, eax
mov dword [ebp - 0x10], edi
lea eax, [ebp - 0x224]
mov dword [ebp - 4], esi
lea esi, [ebp - 4]
lea edi, [ebp - 0x10]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp + eax - 0x224]
push eax
push edi
push ebx
push 0x401024
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x40101c
lea eax, [ebp - 0x328]
push eax
mov esi, pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
lea eax, [ebp - 0x328]
push eax
xor edi, edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push edi
lea eax, [ebp - 0x328]
push esi
push 4
push edi
push edi
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x4016a2
push 2
push edi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x14], edi
cmp dword [0x40616c], edi
je 0x40168a
mov esi, dword [ebp + 8]
mov ebx, 0x401008
movzx eax, word [ebp - 0x24]
movzx ecx, word [ebp - 0x1e]
movzx edx, word [ebp - 0x22]
push eax
push ecx
push edx
lea eax, [ebp - 0x124]
push 0x401010
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea ecx, [ebp - 4]
lea edx, [ebp - 0x124]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea ecx, [ebp - 0x124]
push ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x224]
lea edx, [ebp - 0x124]
push ecx
push ebx
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 4]
lea edx, [ebp - 0x124]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea ecx, [ebp - 0x124]
push ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
lea ecx, [ebp - 0x124]
push ebx
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 4]
lea ecx, [ebp - 0x124]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea ecx, [ebp - 0x124]
push ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x100
lea ecx, [ebp - 0x428]
push ecx
push esi
call fcn.00403832
lea ecx, [ebp - 0x428]
lea eax, [ebp - 0x124]
push ecx
push ebx
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 4]
lea edx, [ebp - 0x124]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea ecx, [ebp - 0x124]
push ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x428]
lea eax, [esi + 0x32]
push ecx
push eax
push esi
call fcn.00403504
lea ecx, [ebp - 0x428]
lea eax, [ebp - 0x124]
push ecx
push ebx
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 4]
lea edx, [ebp - 0x124]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea ecx, [ebp - 0x124]
push ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x100
lea ecx, [ebp - 0x428]
push ecx
lea eax, [esi + 0x32]
push eax
call fcn.004037bb
test eax, eax
je 0x401635
lea eax, [ebp - 0x428]
jmp 0x401638
lea eax, [esi + 0x32]
push eax
lea ecx, [ebp - 0x124]
push section..text
add esi, 0x138
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 4]
lea ecx, [ebp - 0x124]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea ecx, [ebp - 0x124]
push ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
inc dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
cmp dword [0x40616c], ecx
ja 0x4014bf
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 3
lea eax, [ebp - 0x328]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4