Function at 0x403da0
Capabilities:
Get common file path
Get file attributes
Query or enumerate registry value
Read .ini file
Set file attributes
Set registry value
Write file on windows

Disassembly:
sub esp, 0x324
push ebx
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x29]
mov byte [esp + 0x28], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x231]
mov byte [esp + 0x230], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x12d]
mov byte [esp + 0x12c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x28]
push 0x104
push eax
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x2b]
lea edx, [esp + 0x28]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x230]
mov esi, 0x104
stosb byte es:[edi], al
lea eax, [esp + 0x230]
sub edx, ecx
mov cl, byte [eax + edx]
test cl, cl
je 0x403e43
mov byte [eax], cl
inc eax
dec esi
jne 0x403e34
jmp 0x403e47
test esi, esi
jne 0x403e48
dec eax
mov byte [eax], 0
mov ecx, 0x104
lea eax, [esp + 0x230]
cmp byte [eax], 0
je 0x403e62
inc eax
dec ecx
jne 0x403e57
jmp 0x403e95
test ecx, ecx
je 0x403e95
lea edx, [esp + 0x18]
test edx, edx
je 0x403e77
mov eax, 0x104
sub eax, ecx
jmp 0x403e7b
mov eax, dword [esp + 0x18]
mov ecx, 0x104
push 0x441a90
sub ecx, eax
lea edx, [esp + eax + 0x234]
push ecx
push edx
call fcn.00402320
mov ecx, 0x104
lea eax, [esp + 0x28]
cmp byte [eax], 0
je 0x403ea9
inc eax
dec ecx
jne 0x403e9e
jmp 0x403ed9
test ecx, ecx
je 0x403ed9
lea eax, [esp + 0x18]
test eax, eax
je 0x403ebe
mov eax, 0x104
sub eax, ecx
jmp 0x403ec2
mov eax, dword [esp + 0x18]
mov ecx, 0x104
push 0x441a84
sub ecx, eax
lea edx, [esp + eax + 0x2c]
push ecx
push edx
call fcn.00402320
lea eax, [esp + 0x28]
push eax
call fcn.00403a80
add esp, 4
test eax, eax
je 0x404745
lea ecx, [esp + 0x230]
push 0x104
push ecx
call fcn.00402c90
add esp, 8
mov ecx, 0x104
lea eax, [esp + 0x230]
cmp byte [eax], 0
je 0x403f1a
inc eax
dec ecx
jne 0x403f0f
jmp 0x403f4d
test ecx, ecx
je 0x403f4d
lea edx, [esp + 0x18]
test edx, edx
je 0x403f2f
mov eax, 0x104
sub eax, ecx
jmp 0x403f33
mov eax, dword [esp + 0x18]
mov ecx, 0x104
push 0x4411b4
sub ecx, eax
lea edx, [esp + eax + 0x234]
push ecx
push edx
call fcn.00402320
lea eax, [esp + 0x28]
push eax
call fcn.00403cf0
add esp, 4
test eax, eax
je 0x403f6e
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x324
ret
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [esp + 0x28]
mov esi, eax
push 0x80
push edx
mov dword [esp + 0x20], esi
call edi
test eax, eax
je 0x404745
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0
push 3
push 0
push 1
lea eax, [esp + 0x3c]
push 0x12019f
push eax
call ebp
cmp eax, 0xffffffff
jne 0x403fcf
lea ecx, [esp + 0x28]
push esi
push ecx
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x324
ret
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x28]
push edx
push 0
push 0x441a7c
push 0x441a70
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp eax, 5
mov dword [esp + 0x1c], eax
jae 0x40409f
lea eax, [esp + 0x230]
push 0x104
push eax
call fcn.00402c90
add esp, 8
lea ecx, [esp + 0x10]
lea edx, [esp + 0x230]
push ecx
push 0x104
push edx
call fcn.004023d0
test eax, eax
jl 0x40404e
mov eax, dword [esp + 0x10]
mov ecx, 0x104
sub ecx, eax
push 0x4411b4
lea edx, [esp + eax + 0x234]
push ecx
push edx
call fcn.00402320
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x12c]
push eax
push 0x441a6c
push 0x104
push ecx
call fcn.0042b070
add esp, 0x10
lea edx, [esp + 0x230]
lea eax, [esp + 0x12c]
push edx
push eax
push 0x441a7c
push 0x441a64
call ebx
lea ecx, [esp + 0x28]
push ecx
push 0x441a60
push 0x441a7c
push 0x441a70
call ebx
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x230]
mov edx, 0x441a5c
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x12c]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x12c]
mov esi, 0x104
lea eax, [esp + 0x12c]
sub edx, ecx
mov cl, byte [eax + edx]
test cl, cl
je 0x4040e6
mov byte [eax], cl
inc eax
dec esi
jne 0x4040d7
jmp 0x4040ea
test esi, esi
jne 0x4040eb
dec eax
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edx, [esp + 0x28]
mov byte [eax], 0
push edx
lea eax, [esp + 0x130]
push 0x104
push eax
push 0
push 0x441a54
push 0x441a70
call esi
lea ecx, [esp + 0x12c]
push 0x104
push ecx
call fcn.00403bc0
add esp, 8
lea edx, [esp + 0x28]
lea eax, [esp + 0x230]
lea ecx, [esp + 0x12c]
push edx
push 0x104
push eax
push 0
push ecx
push 0x441a40
call esi
lea edx, [esp + 0x230]
push 0x441a3c
push edx
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
mov esi, eax
test esi, esi
je 0x404745
lea eax, [esp + 0x10]
lea ecx, [esp + 0x12c]
push eax
push 0x104
push ecx
call fcn.004023d0
test eax, eax
jl 0x4041a2
mov eax, dword [esp + 0x10]
mov edx, 0x104
sub edx, eax
push 0x441a38
lea eax, [esp + eax + 0x130]
push edx
push eax
call fcn.00402320
mov ecx, 0x104
lea eax, [esp + 0x12c]
cmp byte [eax], 0
je 0x4041b9
inc eax
dec ecx
jne 0x4041ae
jmp 0x4041ec
test ecx, ecx
je 0x4041ec
lea edx, [esp + 0x10]
test edx, edx
je 0x4041ce
mov eax, 0x104
sub eax, ecx
jmp 0x4041d2
mov eax, dword [esp + 0x10]
mov ecx, 0x104
push 0x44197c
sub ecx, eax
lea edx, [esp + eax + 0x130]
push ecx
push edx
call fcn.00402320
lea eax, [esp + 0x10]
lea ecx, [esp + 0x12c]
push eax
push 0x104
push ecx
call fcn.004023d0
test eax, eax
jl 0x404221
mov eax, dword [esp + 0x10]
mov edx, 0x104
sub edx, eax
push esi
lea eax, [esp + eax + 0x130]
push edx
push eax
call fcn.00402320
lea ecx, [esp + 0x10]
lea edx, [esp + 0x12c]
push ecx
push 0x104
push edx
call fcn.004023d0
test eax, eax
jl 0x40425a
mov eax, dword [esp + 0x10]
mov ecx, 0x104
sub ecx, eax
push 0x441a28
lea edx, [esp + eax + 0x130]
push ecx
push edx
call fcn.00402320
push 0
push 0
push 3
push 0
push 1
lea eax, [esp + 0x3c]
push 0x12019f
push eax
call ebp
mov esi, eax
cmp esi, 0xffffffff
jne 0x404294
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x28]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x324
ret
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x1c]
push 0
push eax
lea edi, [esp + 0x134]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
dec ecx
push ecx
lea ecx, [esp + 0x138]
push ecx
push esi
call ebp
test eax, eax
je 0x40472e
mov edi, 0x441a5c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
push 0
dec ecx
push edx
push ecx
push 0x441a5c
push esi
call ebp
test eax, eax
je 0x40472e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00404a40
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov eax, 4
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
mov dword [esp + 0x20], 0
push eax
push 0x441a18
push reloc.OLEAUT32.dll_SysReAllocString
call edi
test eax, eax
je 0x40434e
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x324
ret
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0x24]
lea eax, [esp + 0x20]
push edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
push ecx
push 0
push 0x441a10
push edx
call esi
test eax, eax
je 0x40438d
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x324
ret
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x12c]
push ecx
push 0x441a6c
push 0x104
push edx
call fcn.0042b070
lea eax, [esp + 0x240]
push 0x104
push eax
call fcn.00402c90
add esp, 0x18
mov ecx, 0x104
lea eax, [esp + 0x230]
cmp byte [eax], 0
je 0x4043d5
inc eax
dec ecx
jne 0x4043ca
jmp 0x404408
test ecx, ecx
je 0x404408
lea edx, [esp + 0x10]
test edx, edx
je 0x4043ea
mov eax, 0x104
sub eax, ecx
jmp 0x4043ee
mov eax, dword [esp + 0x10]
mov ecx, 0x104
push 0x4411b4
sub ecx, eax
lea edx, [esp + eax + 0x234]
push ecx
push edx
call fcn.00402320
lea eax, [esp + 0x230]
lea ecx, [esp + 0x12c]
push eax
push ecx
push 0x441a10
push 0x441a64
call ebx
lea edx, [esp + 0x24]
lea eax, [esp + 0x20]
push edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
push ecx
push 0
push 0x441a08
push edx
call esi
test eax, eax
je 0x40445d
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x324
ret
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x12c]
push ecx
push 0x441a6c
push 0x104
push edx
call fcn.0042b070
add esp, 0x10
lea eax, [esp + 0x230]
lea ecx, [esp + 0x12c]
push eax
push ecx
push 0x441a08
push 0x441a64
call ebx
lea edx, [esp + 0x24]
lea eax, [esp + 0x20]
push edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
push ecx
push 0
push 0x441a00
push edx
call esi
test eax, eax
je 0x4044d1
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x324
ret
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x12c]
push ecx
push 0x441a6c
push 0x104
push edx
call fcn.0042b070
add esp, 0x10
lea eax, [esp + 0x230]
lea ecx, [esp + 0x12c]
push eax
push ecx
push 0x441a00
push 0x441a64
call ebx
lea edx, [esp + 0x24]
lea eax, [esp + 0x20]
push edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
push ecx
push 0
push 0x4419f0
push edx
call esi
test eax, eax
je 0x404545
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x324
ret
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x12c]
push ecx
push 0x441a6c
push 0x104
push edx
call fcn.0042b070
add esp, 0x10
lea eax, [esp + 0x230]
lea ecx, [esp + 0x12c]
push eax
push ecx
push 0x4419f0
push 0x441a64
call ebx
lea edx, [esp + 0x230]
push edx
push 0x441854
push 0x4419e4
push 0x4411a4
call ebx
mov eax, dword [esp + 0x14]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call ebx
lea ecx, [esp + 0x230]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ecx, 0x4419e0
lea edx, [esp + 0x28]
mov esi, 0x104
lea eax, [esp + 0x28]
sub ecx, edx
mov dl, byte [eax + ecx]
test dl, dl
je 0x4045de
mov byte [eax], dl
inc eax
dec esi
jne 0x4045cf
jmp 0x4045e2
test esi, esi
jne 0x4045e3
dec eax
mov byte [eax], 0
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x2c]
push 0x104
push ecx
call fcn.004023d0
test eax, eax
jl 0x40461c
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x230]
mov ecx, 0x104
push edx
sub ecx, eax
lea edx, [esp + eax + 0x2c]
push ecx
push edx
call fcn.00402320
lea eax, [esp + 0x10]
lea ecx, [esp + 0x28]
push eax
push 0x104
push ecx
call fcn.004023d0
test eax, eax
jl 0x40464f
mov eax, dword [esp + 0x10]
mov edx, 0x104
sub edx, eax
push 0x4419e0
lea eax, [esp + eax + 0x2c]
push edx
push eax
call fcn.00402320
mov ecx, 0x104
lea eax, [esp + 0x28]
cmp byte [eax], 0
je 0x404663
inc eax
dec ecx
jne 0x404658
jmp 0x404693
test ecx, ecx
je 0x404693
lea edx, [esp + 0x10]
test edx, edx
je 0x404678
mov eax, 0x104
sub eax, ecx
jmp 0x40467c
mov eax, dword [esp + 0x10]
mov ecx, 0x104
push 0x4419d8
sub ecx, eax
lea edx, [esp + eax + 0x2c]
push ecx
push edx
call fcn.00402320
lea eax, [esp + 0x14]
push eax
push 0x4419a8
push reloc.OLEAUT32.dll_SysReAllocString
call edi
test eax, eax
je 0x4046bc
mov ecx, dword [esp + 0x14]
push ecx
call ebx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x324
ret
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x28]
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x24]
push 0x441828
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x4046fa
mov ecx, dword [esp + 0x14]
push ecx
call ebx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x324
ret
mov edx, dword [esp + 0x14]
push edx
call ebx
lea eax, [esp + 0x28]
push eax
call fcn.00403a80
mov ecx, dword [esp + 0x1c]
add esp, 4
lea edx, [esp + 0x28]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x324
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x28]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x324
ret