Function at 0x100a808
Capabilities:
Get common file path
Query environment variable
Read .ini file
Set current directory
Set environment variable

Disassembly:
push 0xa8c
push 0x1020208
call fcn.0100b4a0
mov edi, dword [ebp + 8]
mov dword [ebp - 0xa88], edi
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xa84], eax
xor esi, esi
mov dword [ebp - 0xa74], esi
mov dword [ebp - 0xa58], esi
mov dword [ebp - 0xa7c], esi
mov dword [ebp - 0xa80], esi
mov dword [ebp - 0xa54], esi
push 0x624
push esi
lea eax, [ebp - 0xa50]
push eax
call sub.msvcrt.dll_memset
mov dword [ebp - 0x42c], esi
push 0x204
push esi
lea eax, [ebp - 0x428]
push eax
call sub.msvcrt.dll_memset
mov dword [ebp - 0xa64], esi
mov dword [ebp - 0xa78], esi
xor eax, eax
mov word [ebp - 0x224], ax
push 0x206
push esi
lea eax, [ebp - 0x222]
push eax
call sub.msvcrt.dll_memset
add esp, 0x24
mov dword [ebp - 0xa6c], esi
mov dword [ebp - 0xa70], esi
mov dword [ebp - 0xa60], esi
mov dword [ebp - 4], esi
mov dword [0x10223e8], edi
mov dword [0x10223e4], edi
mov ebx, 0x10223e8
push ebx
call fcn.01016ca7
call fcn.01016d18
lea eax, [ebp - 0xa7c]
push eax
call fcn.01013c0b
mov dword [ebp - 0xa80], eax
push ebx
call fcn.0101740f
lea eax, [ebp - 0xa54]
push eax
call fcn.010187b7
lea eax, [ebp - 0x634]
push eax
call fcn.0101798f
push 0x104
lea eax, [ebp - 0x42c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x100af1c
lea eax, [ebp - 0xa78]
push eax
lea eax, [ebp - 0x42c]
push eax
call fcn.01010d93
mov dword [ebp - 0xa64], eax
cmp eax, esi
je 0x100af1c
mov eax, dword [ebp - 0xa78]
cmp eax, esi
je 0x100af1c
xor ecx, ecx
mov word [eax - 2], cx
mov ecx, dword [section..data]
mov eax, dword [ecx]
push 0x10018f8
call dword [eax + 0x148]
mov edi, eax
cmp edi, esi
je 0x100a9a4
mov ecx, dword [section..data]
mov eax, dword [ecx]
push 0x10018e4
push edi
call dword [eax + 0x144]
cmp eax, esi
je 0x100a995
push dword [ebp - 0xa64]
call eax
test eax, eax
jne 0x100a995
call fcn.0100a611
jmp 0x100af26
mov ecx, dword [section..data]
mov eax, dword [ecx]
push edi
call dword [eax + 0x14c]
push esi
push esi
mov edi, 0x10018a0
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x100a9e6
lea eax, [ebp - 0x224]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x100af1c
lea eax, [ebp - 0x224]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
je 0x100af1c
push dword [ebp - 0xa64]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x100af1c
push dword [ebp - 0xa64]
call fcn.01016b0f
mov dword [ebp - 0xa5c], eax
xor eax, eax
cmp ax, word [ebp - 0x83c]
je 0x100aa74
push ebx
lea eax, [ebp - 0x83c]
push eax
push 0x100188c
call fcn.010143a0
mov edi, eax
cmp edi, esi
jge 0x100ab66
push edi
lea eax, [ebp - 0x83c]
push eax
push 0x1001880
push 0x10017f8
push 0x2000000
push 0x1022794
call fcn.0100a624
push edi
lea eax, [ebp - 0x83c]
push eax
push 0x203
push dword [0x10223e8]
push esi
call fcn.01016e8a
add esp, 0x2c
jmp 0x100af2c
push 0x10017e0
push dword [ebp - 0xa64]
call fcn.0101405b
mov dword [ebp - 0xa68], eax
xor edi, edi
mov dword [ebp - 0xa8c], edi
cmp eax, esi
je 0x100aaf0
mov ecx, dword [0x1022008]
mov eax, dword [ecx]
push dword [ebp - 0xa68]
call dword [eax]
test eax, eax
je 0x100aacf
push dword [ebp - 0xa68]
push esi
push 0x10017cc
push 0x10017c4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov edi, eax
dec edi
neg edi
sbb edi, edi
inc edi
mov dword [ebp - 0xa8c], edi
mov ecx, dword [section..data]
mov ebx, dword [ecx]
push dword [ebp - 0xa68]
push esi
call dword [ebx + 0x1c]
push eax
mov ecx, dword [section..data]
call dword [ebx + 0x30]
mov ebx, 0x10223e8
cmp dword [ebp - 0xa5c], 4
je 0x100ab66
cmp edi, esi
jne 0x100ab66
push 0x104
lea eax, [ebp - 0x83c]
push eax
push dword [ebp - 0xa5c]
call fcn.010173c4
mov edi, eax
cmp edi, esi
jl 0x100ab32
push ebx
lea eax, [ebp - 0x83c]
push eax
push 0x100188c
call fcn.010143a0
mov edi, eax
cmp edi, esi
jge 0x100ab66
push edi
push 0x1001880
push 0x1001750
push 0x2000000
push 0x1022794
call fcn.0100a624
push edi
push 0x204
push dword [0x10223e8]
push esi
call fcn.01016e8a
add esp, 0x24
jmp 0x100af2c
push dword [0x10223e8]
push dword [ebp - 0xa60]
call fcn.0101709f
test eax, eax
je 0x100af2c
call fcn.01013daf
test eax, eax
je 0x100abaa
call fcn.01013d54
test eax, eax
je 0x100abaa
push 0x205
push dword [0x10223e8]
push esi
call fcn.01016e8a
add esp, 0xc
jmp 0x100af2c
push dword [0x10223e8]
push dword [ebp - 0xa60]
call fcn.01017109
test eax, eax
je 0x100af2c
mov dword [ebp - 0xa9c], esi
xor eax, eax
lea edi, [ebp - 0xa98]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push dword [ebp - 0xa54]
call fcn.010172c3
mov dword [ebp - 0xa68], eax
cmp eax, esi
jne 0x100ac0b
call fcn.01017315
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x1022018
call fcn.0100b7e8
add esp, 0xc
mov eax, 0x480
jmp 0x100b00b
cmp dword [ebp - 0xa48], 1
jne 0x100ac24
push dword [0x10223e8]
call fcn.01018791
jmp 0x100af2c
cmp dword [ebp - 0xa5c], 4
jne 0x100ac50
lea eax, [ebp - 0xa70]
push eax
call fcn.01016481
test eax, eax
jl 0x100ac82
mov ecx, dword [ebp - 0xa70]
call fcn.0101528c
mov dword [ebp - 0xa60], eax
jmp 0x100ac82
lea eax, [ebp - 0xa60]
push eax
lea eax, [ebp - 0xa70]
push eax
lea eax, [ebp - 0x83c]
push eax
xor eax, eax
cmp dword [ebp - 0xa5c], 1
setne al
add eax, 0x191
push eax
push dword [0x10223e8]
call fcn.01018444
mov edi, 0x1001730
push edi
call fcn.010179c1
mov ebx, eax
mov dword [ebp - 0xa6c], ebx
cmp ebx, esi
jne 0x100acc9
mov ecx, dword [section..data]
mov eax, dword [ecx]
call dword [eax]
mov dword [ebp - 0xa58], eax
push eax
push edi
push 0x1f7
push dword [0x10223e8]
push dword [ebp - 0xa60]
call fcn.01016e8a
add esp, 0x14
jmp 0x100af2c
mov eax, dword [ebp - 0xa5c]
dec eax
je 0x100ad1a
dec eax
je 0x100acdd
dec eax
dec eax
jne 0x100aefd
push dword [ebp - 0xa4c]
lea eax, [ebp - 0x83c]
push eax
push esi
push dword [0x10223e8]
push dword [ebp - 0xa60]
push ebx
call fcn.010174ed
mov dword [ebp - 0xa58], eax
cmp eax, esi
jne 0x100aefd
mov dword [ebp - 0xa74], 1
jmp 0x100aefd
mov dword [ebp - 0xa5c], esi
mov eax, dword [ebp - 0xa44]
cmp ax, 0x61
jb 0x100ad32
cmp ax, 0x7a
jbe 0x100ad3b
add eax, 0xffffffbf
cmp ax, 0x19
ja 0x100ad40
xor eax, eax
inc eax
jmp 0x100ad42
xor eax, eax
cmp eax, esi
jne 0x100adb6
lea eax, [ebp - 0xa5c]
push eax
push dword [ebp - 0xa64]
push dword [0x10223e8]
push dword [ebp - 0xa60]
push ebx
call fcn.0101755d
test eax, eax
jl 0x100aecf
push dword [ebp - 0xa5c]
push 0x104
lea eax, [ebp - 0xa44]
push eax
call fcn.01013441
test eax, eax
jl 0x100aecf
mov eax, dword [ebp - 0xa44]
cmp ax, 0x61
jb 0x100ad9e
cmp ax, 0x7a
jbe 0x100ada7
add eax, 0xffffffbf
cmp ax, 0x19
ja 0x100adac
xor eax, eax
inc eax
jmp 0x100adae
xor eax, eax
cmp eax, esi
je 0x100aecf
cmp dword [ebp - 0xa54], esi
je 0x100ae01
push dword [ebp - 0xa4c]
lea eax, [ebp - 0x83c]
push eax
lea eax, [ebp - 0xa44]
push eax
push dword [0x10223e8]
push dword [ebp - 0xa60]
push ebx
call fcn.010174ed
mov dword [ebp - 0xa58], eax
cmp eax, esi
jne 0x100aecf
mov dword [ebp - 0xa74], 1
jmp 0x100aecf
mov ecx, dword [section..data]
mov eax, dword [ecx]
push ebx
call dword [eax + 0x14c]
mov dword [ebp - 0xa6c], esi
xor eax, eax
cmp ax, word [ebp - 0xa44]
jne 0x100ae46
mov dword [ebp - 0xa58], 0x1f
push 0x1fc
push dword [0x10223e8]
push dword [ebp - 0xa60]
call fcn.01016e8a
add esp, 0xc
jmp 0x100aeb1
lea eax, [ebp - 0xa58]
push eax
lea eax, [ebp - 0xa9c]
push eax
push dword [ebp - 0xa84]
push dword [ebp - 0xa78]
push dword [ebp - 0xa64]
lea eax, [ebp - 0xa54]
push eax
push dword [0x10223e8]
call fcn.01017c0d
test eax, eax
jne 0x100aea0
mov dword [ebp - 0xa58], 0x1f
lea eax, [ebp - 0xa9c]
push eax
push dword [0x10223e8]
push dword [ebp - 0xa60]
call fcn.01016ec0
jmp 0x100aeb1
xor eax, eax
cmp dword [ebp - 0xa58], esi
sete al
mov dword [ebp - 0xa74], eax
cmp dword [ebp - 0xa58], 0x4c7
jne 0x100aecf
mov ecx, dword [0x1022008]
mov eax, dword [ecx]
lea edx, [ebp - 0xa44]
push edx
call dword [eax + 8]
cmp dword [ebp - 0xa5c], esi
je 0x100aefd
mov ecx, dword [section..data]
mov edi, dword [ecx]
push dword [ebp - 0xa5c]
push esi
call dword [edi + 0x1c]
push eax
mov ecx, dword [section..data]
call dword [edi + 0x30]
test eax, eax
je 0x100aefd
mov dword [ebp - 0xa5c], esi
mov ecx, dword [section..data]
mov eax, dword [ecx]
push dword [ebp - 0xa68]
call dword [eax + 0x64]
lea eax, [ebp - 0xa9c]
push eax
call fcn.01015132
jmp 0x100af2c
mov ecx, dword [section..data]
mov eax, dword [ecx]
call dword [eax]
mov dword [ebp - 0xa58], eax
mov dword [ebp - 4], 0xfffffffe
call fcn.0100af52
cmp dword [ebp - 0xa74], 1
jne 0x100afe9
mov dword [ebp - 0xa58], esi
jmp 0x100affb
cmp dword [ebp - 0xa58], esi
jne 0x100affb
mov dword [ebp - 0xa58], 0x1f
call fcn.01016d3f
call fcn.01016ccf
mov eax, dword [ebp - 0xa58]
call fcn.0100b4e8
ret 0x10