Function at 0x10003228
Capabilities:
Get file attributes
Query environment variable
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
push ebx
push esi
push edi
push 0x104
lea eax, [ebp - 0x41c]
push eax
push 0
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
mov ebx, dword [ebp + 0x14]
mov ecx, eax
mov esi, dword [ebp + 8]
mov edi, dword [sym.imp.kernel32.dll_GetFileAttributesA]
mov dword [ebp - 8], ecx
test ecx, ecx
je 0x1000343d
cmp dword [ebx + 0x18], 0
je 0x10003381
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x214]
push 0x104
push eax
call fcn.10003c70
lea eax, [ebp - 0x214]
push eax
call fcn.10003cb0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1000337b
lea edi, [ebp - 0x214]
nop word [eax + eax]
cmp byte [edi + esi - 1], 0x5c
je 0x100032bf
test esi, esi
je 0x10003375
dec esi
cmp byte [edi + esi - 1], 0x5c
jne 0x100032af
test esi, esi
je 0x10003375
lea eax, [ebp - 0x214]
mov byte [ebp + esi - 0x215], 0
push eax
dec esi
lea eax, [ebp - 0x318]
push 0x104
push eax
call fcn.10003c70
add esp, 0xc
lea eax, [ebp - 0x318]
push dword [ebx + 0x18]
push 0x104
push 0x1000f130
push 0x104
push eax
call fcn.10003bd0
add esp, 0xc
push eax
call fcn.10003bd0
lea eax, [ebp - 0x318]
push eax
call fcn.10003cb0
add esp, 0x10
test eax, eax
je 0x1000336d
push dword [ebp + 8]
lea eax, [ebp - 0x318]
push 0x104
push 0x1000f130
push 0x104
push eax
call fcn.10003bd0
add esp, 0xc
push eax
call fcn.10003bd0
add esp, 0xc
lea eax, [ebp - 0x318]
push eax
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
test eax, eax
je 0x1000336d
cmp eax, 0xffffffff
je 0x1000336d
test al, 0x10
je 0x10003675
test esi, esi
jne 0x100032a8
mov edi, dword [sym.imp.kernel32.dll_GetFileAttributesA]
mov ecx, dword [ebp - 8]
mov esi, dword [ebp + 8]
cmp dword [ebx + 0x14], 0
je 0x1000343d
mov eax, 0x108
sub eax, ecx
push str..ini
push eax
lea eax, [ebp + ecx - 0x420]
push eax
call fcn.10003c70
add esp, 0xc
mov byte [ebp - 0x110], 0
lea eax, [ebp - 0x41c]
push eax
push 0x104
lea eax, [ebp - 0x110]
push eax
push 0x1000f140
push 0x1000f148
push dword [ebx + 0x14]
call dword [sym.imp.kernel32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x110]
push eax
call fcn.10003cb0
add esp, 4
test eax, eax
je 0x1000343d
lea eax, [ebp - 0x110]
push eax
call fcn.10003cb0
add esp, 4
test eax, eax
je 0x1000343d
push esi
push 0x104
push 0x1000f130
lea eax, [ebp - 0x110]
push 0x104
push eax
call fcn.10003bd0
add esp, 0xc
push eax
call fcn.10003bd0
add esp, 0xc
lea eax, [ebp - 0x110]
push eax
call edi
test eax, eax
je 0x1000343d
cmp eax, 0xffffffff
je 0x1000343d
test al, 0x10
je 0x1000366d
push 0x104
lea eax, [ebp - 0x110]
push eax
push 0
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
mov dword [ebp - 8], eax
test eax, eax
je 0x100034d0
cmp byte [ebp + eax - 0x111], 0x5c
je 0x10003473
lea ecx, [ebp - 0x110]
dec eax
cmp byte [ecx + eax - 1], 0x5c
jne 0x10003468
mov dword [ebp - 8], eax
mov byte [ebp + eax - 0x111], 0
lea eax, [ebp - 0x110]
push eax
call fcn.10003cb0
add esp, 4
test eax, eax
je 0x100034d0
push esi
push 0x104
push 0x1000f130
lea eax, [ebp - 0x110]
push 0x104
push eax
call fcn.10003bd0
add esp, 0xc
push eax
call fcn.10003bd0
add esp, 0xc
lea eax, [ebp - 0x110]
push eax
call edi
test eax, eax
je 0x100034d0
cmp eax, 0xffffffff
je 0x100034d0
test al, 0x10
je 0x1000366d
cmp dword [ebx], 0
je 0x100037fd
mov eax, dword [ebx + 0x10]
mov esi, dword [sym.imp.advapi32.dll_RegCloseKey]
mov edi, dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsA]
mov dword [ebp - 4], 0
test eax, eax
je 0x100035fd
push eax
lea eax, [ebp - 0x1d8]
push 0xc8
push eax
call fcn.10003c70
add esp, 0xc
lea eax, [ebp - 0x1d8]
push dword [ebx]
push 0xc8
push 0x1000f130
push 0xc8
push eax
call fcn.10003bd0
add esp, 0xc
push eax
call fcn.10003bd0
add esp, 0xc
mov dword [ebp - 8], 0x104
lea eax, [ebp - 4]
mov dword [ebp - 0xc], 0
push eax
push 1
push 0
lea eax, [ebp - 0x1d8]
push eax
push 0x80000002
call dword [sym.imp.advapi32.dll_RegOpenKeyExA]
test eax, eax
jne 0x100035ec
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
push str.Path
push dword [ebp - 4]
call dword [sym.imp.advapi32.dll_RegQueryValueExA]
test eax, eax
jne 0x100035ec
push dword [ebp - 4]
call esi
cmp dword [ebp - 0xc], 2
mov dword [ebp - 4], 0
jne 0x100035cd
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x41c]
push 0x104
push eax
call fcn.10003c70
add esp, 0xc
lea eax, [ebp - 0x110]
push 0x104
push eax
lea eax, [ebp - 0x41c]
push eax
call edi
mov dword [ebp - 8], eax
push dword [ebp + 8]
lea eax, [ebp - 0x110]
push 0x104
push eax
call fcn.10003140
add esp, 0xc
test al, al
jne 0x1000366d
mov eax, dword [ebp - 4]
test eax, eax
je 0x100035f6
push eax
call esi
mov dword [ebp - 4], 0
mov eax, dword [ebx + 4]
test eax, eax
je 0x10003693
push 0x104
lea ecx, [ebp - 0x110]
push ecx
push eax
call edi
mov dword [ebp - 8], eax
dec eax
cmp eax, 0x102
ja 0x10003693
cmp byte [ebp - 0x110], 0x25
je 0x10003693
push dword [ebx]
lea eax, [ebp - 0x110]
push 0x104
push 0x1000f130
push 0x104
push eax
call fcn.10003bd0
add esp, 0xc
push eax
call fcn.10003bd0
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x110]
push edi
push 0x104
push eax
call fcn.10003140
add esp, 0x18
test al, al
je 0x10003696
lea eax, [ebp - 0x110]
jmp 0x1000367b
lea eax, [ebp - 0x318]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.10003c70
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 8]
cmp dword [ebx + 0xc], 0
je 0x1000375e
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x1000f158
push 0x80000002
call dword [sym.imp.advapi32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10003754
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x110]
push eax
push 0
push 0
push str.ProgramFilesDir
push dword [ebp - 4]
call dword [sym.imp.advapi32.dll_RegQueryValueExA]
test eax, eax
jne 0x10003754
push dword [ebx + 0xc]
lea eax, [ebp - 0x110]
push 0x104
push 0x1000f130
push 0x104
push eax
call fcn.10003bd0
add esp, 0xc
push eax
call fcn.10003bd0
add esp, 0xc
push dword [ebx]
push 0x104
push 0x1000f130
push 0x104
push eax
call fcn.10003bd0
add esp, 0xc
push eax
call fcn.10003bd0
push edi
lea eax, [ebp - 0x110]
push 0x104
push eax
call fcn.10003140
add esp, 0x18
test al, al
je 0x10003754
push dword [ebp - 4]
call esi
lea eax, [ebp - 0x110]
jmp 0x1000367b
mov eax, dword [ebp - 4]
test eax, eax
je 0x1000375e
push eax
call esi
mov eax, dword [ebx + 8]
test eax, eax
je 0x100037fd
push eax
lea eax, [ebp - 0x110]
push 0x104
push eax
call fcn.10003c70
add esp, 0xc
lea eax, [ebp - 0x110]
push dword [ebx]
push 0x104
push 0x1000f130
push 0x104
push eax
call fcn.10003bd0
add esp, 0xc
push eax
call fcn.10003bd0
lea eax, [ebp - 0x110]
push eax
call fcn.10003cb0
add esp, 0x10
test eax, eax
je 0x100037fd
push edi
push 0x104
push 0x1000f130
lea eax, [ebp - 0x110]
push 0x104
push eax
call fcn.10003bd0
add esp, 0xc
push eax
call fcn.10003bd0
add esp, 0xc
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
test eax, eax
je 0x100037fd
cmp eax, 0xffffffff
je 0x100037fd
test al, 0x10
je 0x1000366d
push dword [ebp + 8]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.10003c70
add esp, 0xc
mov eax, 0x485
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret