Function at 0x66406910
Capabilities:
Get process heap flags
Read .ini file

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x58
mov eax, dword [ecx]
mov edi, dword [ecx + 4]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 8]
mov dword [ebp - 0x2c], eax
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x24], eax
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0x28], eax
mov eax, dword [ecx + 0x14]
mov dword [ebp - 0x20], eax
test byte [0x66444750], 8
jne 0x66406a58
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x66406acc
mov eax, dword [ebp - 0x28]
movzx edx, ax
mov dword [ebp - 0x30], edx
test edi, edi
je 0x664069b0
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], edi
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x30]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetPrivateProfileStringA]
sub esp, 0x18
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x18
mov ebx, 0x400
cmp ax, bx
cmovbe ebx, eax
mov esi, dword fs:[0x18]
movzx ebx, bx
jmp 0x66406a21
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetPrivateProfileSectionA]
sub esp, 0x10
test eax, eax
je 0x66406af0
lea ecx, [ebx - 2]
cmp ecx, eax
jne 0x66406b50
mov dword [esp + 8], edi
add ebx, ebx
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov edi, eax
test eax, eax
jne 0x664069d0
xor eax, eax
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x18
call fcn.66405d60
mov esi, eax
mov eax, dword [ebp - 0x2c]
call fcn.66405d60
mov dword [ebp - 0x30], eax
mov eax, edi
call fcn.66405d60
mov ebx, eax
mov eax, dword [ebp - 0x1c]
call fcn.66405d60
mov edx, dword [ebp - 0x24]
mov dword [esp + 0x24], esi
movzx ecx, word [ebp - 0x28]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__s___s___s___p___u___s__n
mov dword [esp + 0x1c], edx
mov edx, dword [ebp - 0x30]
mov dword [esp + 0x20], ecx
mov dword [esp + 8], str.GetPrivateProfileString16
mov dword [esp + 4], 0x66444750
mov dword [esp + 0x18], edx
mov dword [esp], 3
call fcn.66405b50
mov edx, dword [ebp - 0x1c]
test edx, edx
jne 0x6640695c
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x66406a45
cmp word [ebp - 0x28], 0
je 0x66406a45
mov eax, dword [ebp - 0x24]
mov byte [eax], 0
xor eax, eax
jmp 0x66406998
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [ebp - 0x20]
sub esp, 0xc
mov dword [esp + 4], 0
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x30]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetPrivateProfileStringA]
sub esp, 0x18
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x18
cmp word [ebp - 0x28], 0
je 0x66406c98
movzx eax, word [ebp - 0x28]
mov dword [ebp - 0x1c], edi
mov esi, eax
lea esi, [esi]
cmp byte [edi], 0
je 0x66406c60
mov dword [esp + 4], 0x3d
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strchr]
mov ebx, eax
test eax, eax
je 0x66406c48
sub ebx, edi
movzx ecx, si
cmp ebx, ecx
jge 0x66406bd8
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], edi
sub esi, 1
mov dword [esp + 8], ebx
sub esi, ebx
mov dword [esp], eax
call sub.ucrtbase.dll_memcpy
mov eax, dword [ebp - 0x24]
add eax, ebx
lea edx, [eax + 1]
mov byte [eax], 0
mov dword [ebp - 0x24], edx
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strlen]
lea edi, [edi + eax + 1]
test si, si
jne 0x66406b68
mov edi, dword [ebp - 0x1c]
jmp 0x66406bfd
mov esi, edi
mov dword [esp + 8], ecx
mov edi, dword [ebp - 0x1c]
mov dword [esp + 4], esi
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x1c], ecx
mov dword [esp], esi
call sub.ucrtbase.dll_memcpy
mov ecx, dword [ebp - 0x1c]
mov eax, esi
add eax, ecx
mov dword [ebp - 0x24], eax
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
cmp word [ebp - 0x28], 2
jbe 0x66406a45
mov eax, dword [ebp - 0x24]
mov byte [eax - 2], 0
mov byte [eax - 1], 0
movzx eax, word [ebp - 0x28]
sub eax, 2
jmp 0x66406998
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strlen]
lea edi, [edi + eax + 1]
jmp 0x66406b68
mov edi, dword [ebp - 0x1c]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], edi
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [ebp - 0x24]
sub esp, 0xc
mov byte [eax], 0
movzx eax, word [ebp - 0x28]
sub eax, esi
jmp 0x66406998
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
xor eax, eax
sub esp, 0xc
jmp 0x66406a47