Function at 0x40d1c0
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x208
push ebx
push ebp
push esi
mov esi, dword [esp + 0x218]
xor ebx, ebx
push edi
cmp esi, ebx
mov ebp, ecx
je 0x40d1e1
cmp byte [esi], bl
jne 0x40d365
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x115]
mov byte [esp + 0x114], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, str.Tenio.ini
test eax, eax
je 0x40d274
lea ecx, [esp + 0x114]
test ecx, ecx
je 0x40d274
cmp byte [0x421c10], bl
jne 0x40d244
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x104
push 0x421c10
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
push 0x421c10
call fcn.00410c2c
add esp, 8
cmp eax, ebx
je 0x40d244
mov byte [eax], bl
push str.Tenio.ini
push 0x421c10
push str._s_s
push 0x103
lea edx, [esp + 0x124]
push 0x104
push edx
call fcn.0040b6f0
add esp, 0x18
mov byte [esp + 0x217], bl
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x114]
lea ecx, [esp + 0x10]
push eax
push 0x104
push ecx
push ebx
push str.Path
push str.Redirect
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edx, [esp + 0x10]
lea ecx, [esp + 0x10]
test edx, edx
je 0x40d2cf
mov al, byte [esp + 0x10]
cmp al, bl
je 0x40d2cf
cmp al, 0x20
je 0x40d2c7
cmp al, 9
jne 0x40d2fb
mov al, byte [ecx + 1]
inc ecx
cmp al, bl
jne 0x40d2bf
mov eax, dword [esp + 0x224]
mov ecx, dword [esp + 0x220]
lea edx, [esp + 0x114]
push edx
push eax
push ecx
mov ecx, ebp
call fcn.00408010
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 0xc
lea eax, [esp + 0x10]
mov ecx, ebp
push eax
call fcn.004080f0
test eax, eax
je 0x40d33c
mov ecx, dword [esp + 0x224]
mov edx, dword [esp + 0x220]
push ecx
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x11c]
push eax
push ecx
mov ecx, ebp
call fcn.00409cb0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 0xc
mov edx, dword [esp + 0x224]
mov eax, dword [esp + 0x220]
push edx
lea ecx, [esp + 0x14]
push eax
push ecx
mov ecx, ebp
call fcn.00407e70
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 0xc
push 0x3a
push esi
call fcn.00410b95
add esp, 8
test eax, eax
jne 0x40d4e4
cmp byte [esi], 0x5c
je 0x40d4e4
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x115]
mov byte [esp + 0x114], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x114]
test edx, edx
stosb byte es:[edi], al
je 0x40d407
cmp byte [0x421c10], bl
jne 0x40d3db
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x104
push 0x421c10
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
push 0x421c10
call fcn.00410c2c
add esp, 8
cmp eax, ebx
je 0x40d3db
mov byte [eax], bl
push esi
push 0x421c10
push str._s_s
push 0x103
lea eax, [esp + 0x124]
push 0x104
push eax
call fcn.0040b6f0
add esp, 0x18
mov byte [esp + 0x217], bl
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], bl
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x114]
lea edx, [esp + 0x10]
push ecx
push 0x104
stosw word es:[edi], ax
push edx
push ebx
push str.Path
push str.Redirect
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0x10]
mov ecx, ebp
push eax
call fcn.00409c80
test eax, eax
jne 0x40d4b8
lea ecx, [esp + 0x10]
push ecx
mov ecx, ebp
call fcn.004080f0
test eax, eax
je 0x40d48f
mov edx, dword [esp + 0x224]
mov eax, dword [esp + 0x220]
push edx
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x11c]
push ecx
push edx
mov ecx, ebp
call fcn.00409cb0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 0xc
mov eax, dword [esp + 0x224]
mov ecx, dword [esp + 0x220]
push eax
lea edx, [esp + 0x14]
push ecx
push edx
mov ecx, ebp
call fcn.00407e70
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 0xc
mov ecx, dword [esp + 0x224]
mov edx, dword [esp + 0x220]
lea eax, [esp + 0x114]
push eax
push ecx
push edx
mov ecx, ebp
call fcn.00408010
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 0xc
mov eax, dword [esp + 0x224]
mov ecx, dword [esp + 0x220]
push eax
push ecx
push esi
mov ecx, ebp
call fcn.00407e70
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 0xc