Function at 0x4019d5
Capabilities:
Query environment variable
Read .ini file

Disassembly:
sub esp, 0x210
push ebx
push ebp
push esi
push edi
call fcn.00401046
mov esi, eax
mov ebp, 0x400
push ebp
push 0
lea edi, [esi + 0x478]
push edi
call fcn.004156d0
add esp, 0xc
mov ebx, 0x42ba38
push ebx
push ebp
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0x429960
push dword [0x421478]
push dword [0x421474]
call edi
lea eax, [esi + 0x478]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x401ae3
lea eax, [esi + 0x878]
push ebp
push 0
push eax
call fcn.004156d0
add esp, 0xc
lea eax, [esi + 0x878]
push ebx
push ebp
push eax
push 0x429960
push dword [0x421480]
push dword [0x421474]
call edi
lea eax, [esi + 0x878]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x401ae3
lea eax, [esi + 0x78]
push ebp
push 0
push eax
call fcn.004156d0
add esp, 0xc
lea eax, [esi + 0x78]
push ebx
push ebp
push eax
push 0x429960
push dword [0x42147c]
push dword [0x421474]
call edi
lea eax, [esi + 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x401ae3
push 2
lea eax, [esp + 0x16]
push 0
push eax
call fcn.004156d0
add esp, 0xc
lea eax, [esp + 0x12]
push ebx
push 2
push eax
push 0x429960
push dword [0x421484]
push dword [0x421474]
call edi
lea eax, [esp + 0x12]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jne 0x401aea
xor eax, eax
jmp 0x401cfc
and dword [esi + 0x74], 0
cmp dword [0x42c908], 0
jne 0x401b12
lea eax, [esp + 0x12]
push 0x42519c
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x401b12
mov dword [esi + 0x74], 1
and byte [esp + 0x18], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [esp + 0x19]
push ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x1c]
push 0x104
push eax
push 0x429960
push dword [0x421488]
push dword [0x42148c]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0x18]
mov dword [esi + 0x107c], 0x1f40
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x401b71
lea eax, [esp + 0x18]
push eax
call fcn.004158e5
pop ecx
mov dword [esi + 0x107c], eax
and byte [esp + 0x11c], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [esp + 0x11d]
push ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x120]
push 0x104
mov edi, 0x425198
push eax
push edi
push dword [0x421498]
push dword [0x421474]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0x11c]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
push eax
call edi
test eax, eax
jne 0x401bdc
cmp dword [0x42c908], eax
je 0x401bd6
mov dword [esi + 4], 1
jmp 0x401bf6
and dword [esi + 4], 0
jmp 0x401bf6
lea eax, [esp + 0x11c]
push 0x425194
push eax
call edi
test eax, eax
je 0x401bcd
mov dword [esi + 4], 2
push ebx
lea eax, [esi + 8]
push 0x104
mov edi, 0x429960
push eax
push edi
push dword [0x4214a0]
push dword [0x421474]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push ebx
lea eax, [esi + 0x3a]
push 0x104
push eax
push edi
push dword [0x42149c]
push dword [0x421474]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esi + 0x1080]
push edi
push eax
call fcn.00415730
pop ecx
test eax, eax
pop ecx
jne 0x401cad
push ebx
lea eax, [esi + 0x1080]
push ebp
push eax
push edi
push dword [0x421490]
push dword [0x421474]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push ebp
call fcn.004158d7
pop ecx
mov dword [esp + 0x14], eax
push ebp
push eax
lea eax, [esi + 0x1080]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push dword [esp + 0x14]
lea eax, [esi + 0x1080]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp dword [esi + 0x1488], 5
je 0x401cad
lea eax, [esi + 0x1080]
push 1
push eax
push 0x425190
mov ecx, esi
call fcn.0040e70a
cmp dword [esi + 0x1488], 0
jne 0x401cd1
push ebx
push 0
push dword [0x421494]
push dword [0x421474]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [esi + 0x1488], eax
add esi, 0x28d8
push ebp
push 0
push esi
call fcn.004156d0
add esp, 0xc
push ebx
push ebp
push esi
push edi
push dword [0x4214a4]
push dword [0x421474]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 1
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret