Function at 0x40ded0
Capabilities:
Check if file exists
Query or enumerate registry value
Read .ini file

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4a9d37
push eax
mov eax, 0x2228
mov dword fs:[0], esp
call fcn.004a2ae0
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x2248]
mov dword [esp + 0x24], ecx
mov edx, dword [edi]
test edx, edx
je 0x40df1d
mov esi, dword [edi + 4]
test esi, esi
je 0x40df1d
mov eax, dword [edi + 0xc]
test eax, eax
je 0x40df1d
mov ecx, dword [edi + 0x10]
cmp ecx, 0x80
jg 0x40df24
xor eax, eax
jmp 0x40e769
push edx
push ecx
push eax
mov eax, dword [edi + 8]
push eax
push str.RegAppEntry
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov esi, dword [edi + 0xc]
cmp word [esi], 0
je 0x40df44
test esi, esi
jne 0x40df4b
xor eax, eax
jmp 0x40e769
mov ecx, dword [0x4c2080]
mov edx, esi
shr edx, 0x10
mov dword [esp + 0x10], ecx
jne 0x40df6e
and esi, 0xffff
lea ecx, [esp + 0x10]
push esi
call fcn.00405320
jmp 0x40dfa0
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
test edi, edi
je 0x40dfa0
push edi
lea ecx, [esp + 0x14]
call fcn.004056f0
test eax, eax
je 0x40dfa0
mov edx, dword [esp + 0x10]
lea eax, [edi + edi]
push eax
lea ecx, [edi + edi + 2]
push esi
push ecx
push edx
call fcn.00404a40
add esp, 0x10
mov eax, dword [esp + 0x10]
mov dword [esp + 0x2240], 0
mov edi, dword [eax - 8]
test edi, edi
jne 0x40dfde
mov edx, dword [0x4c2084]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40e764
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40e764
jmp 0x40e754
mov ecx, dword [eax - 0xc]
lea esi, [eax - 0xc]
xor ebp, ebp
cmp ecx, 1
jg 0x40dff2
mov ecx, dword [eax - 4]
test ecx, ecx
jge 0x40e032
test edi, edi
jle 0x40dff8
mov ebp, edi
push ebp
lea ecx, [esp + 0x14]
call fcn.004056f0
test eax, eax
je 0x40e032
lea eax, [edi + edi + 2]
lea ecx, [esi + 0xc]
push eax
mov eax, dword [esp + 0x14]
lea edx, [ebp + ebp + 2]
push ecx
push edx
push eax
call fcn.00404a40
mov ecx, dword [esp + 0x20]
add esp, 0x10
push esi
mov dword [ecx - 8], edi
call fcn.00405ad0
mov eax, dword [esp + 0x10]
push 0x4c2b38
push eax
call dword [sym.imp.MSVCRT.dll_wcstok]
mov ebx, dword [esp + 0x2254]
mov ebp, dword [sym.imp.MSVCRT.dll_iswspace]
mov esi, eax
add esp, 8
test esi, esi
je 0x40e125
push esi
push esi
lea edi, [ebx + 0x40]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
mov ecx, edi
call fcn.00405750
mov ecx, edi
call fcn.00405940
mov esi, dword [edi]
mov ax, word [esi]
push eax
call ebp
add esp, 4
test eax, eax
je 0x40e097
push esi
call dword [sym.imp.USER32.dll_CharNextW]
mov esi, eax
mov ax, word [esi]
push eax
call ebp
add esp, 4
test eax, eax
jne 0x40e081
mov eax, dword [edi]
mov edx, esi
sub edx, eax
mov ebp, dword [eax - 8]
sar edx, 1
sub ebp, edx
mov edx, dword [eax - 4]
lea ecx, [ebp + ebp + 2]
push ecx
lea ecx, [edx + edx + 2]
push esi
push ecx
push eax
call fcn.00410080
mov edx, dword [edi]
add esp, 0x10
mov ecx, edi
mov dword [edx - 8], ebp
call fcn.00405940
mov esi, dword [edi]
xor ebp, ebp
mov ax, word [esi]
test ax, ax
je 0x40e10d
push eax
call dword [sym.imp.MSVCRT.dll_iswspace]
add esp, 4
test eax, eax
je 0x40e0e9
test ebp, ebp
jne 0x40e0eb
mov ebp, esi
jmp 0x40e0eb
xor ebp, ebp
push esi
call dword [sym.imp.USER32.dll_CharNextW]
mov esi, eax
mov ax, word [esi]
test ax, ax
jne 0x40e0d3
test ebp, ebp
je 0x40e10d
mov word [ebp], ax
mov edi, dword [edi]
sub ebp, edi
sar ebp, 1
mov dword [edi - 8], ebp
push 0x4c2b38
push 0
call dword [sym.imp.MSVCRT.dll_wcstok]
mov ebp, dword [sym.imp.MSVCRT.dll_iswspace]
add esp, 8
mov esi, eax
mov eax, dword [0x4c2080]
mov dword [esp + 0x14], eax
test esi, esi
mov byte [esp + 0x2240], 1
je 0x40e22c
jne 0x40e144
xor eax, eax
jmp 0x40e14b
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
push eax
lea ecx, [esp + 0x1c]
call fcn.00405750
lea ecx, [esp + 0x14]
call fcn.00405940
mov esi, dword [esp + 0x14]
mov ax, word [esi]
push eax
call ebp
add esp, 4
test eax, eax
je 0x40e186
push esi
call dword [sym.imp.USER32.dll_CharNextW]
mov esi, eax
mov ax, word [esi]
push eax
call ebp
add esp, 4
test eax, eax
jne 0x40e170
mov eax, dword [esp + 0x14]
mov ecx, esi
sub ecx, eax
mov edi, dword [eax - 8]
sar ecx, 1
sub edi, ecx
mov ecx, dword [eax - 4]
lea edx, [edi + edi + 2]
push edx
lea edx, [ecx + ecx + 2]
push esi
push edx
push eax
call fcn.00410080
mov eax, dword [esp + 0x24]
add esp, 0x10
lea ecx, [esp + 0x14]
mov dword [eax - 8], edi
call fcn.00405940
mov esi, dword [esp + 0x14]
xor edi, edi
cmp word [esi], di
je 0x40e201
mov ax, word [esi]
push eax
call ebp
add esp, 4
test eax, eax
je 0x40e1dc
test edi, edi
jne 0x40e1de
mov edi, esi
jmp 0x40e1de
xor edi, edi
push esi
call dword [sym.imp.USER32.dll_CharNextW]
mov esi, eax
cmp word [esi], 0
jne 0x40e1c7
test edi, edi
je 0x40e201
mov word [edi], 0
mov eax, dword [esp + 0x14]
sub edi, eax
sar edi, 1
mov dword [eax - 8], edi
mov eax, dword [ebx + 0x4c]
lea ecx, [ebx + 0x44]
lea edx, [esp + 0x14]
push edx
push eax
call fcn.00410150
push 0x4c2b38
push 0
call dword [sym.imp.MSVCRT.dll_wcstok]
mov esi, eax
add esp, 8
test esi, esi
jne 0x40e144
lea ecx, [esp + 0x10]
call fcn.00405940
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x2248]
mov dword [ecx - 8], eax
mov edx, dword [esp + 0x10]
mov word [edx + eax*2], 0
mov eax, dword [esi]
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0xc]
push eax
mov eax, dword [esi + 8]
push ecx
mov ecx, dword [esi + 4]
push edx
push eax
push str.RegAppPath
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov esi, dword [esi + 0xc]
cmp word [esi], 0
je 0x40e283
test esi, esi
jne 0x40e2e6
mov eax, dword [esp + 0x14]
mov ecx, dword [0x4c2084]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x40e2b4
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40e2b4
mov eax, dword [esp + 0x14]
add eax, 0xfffffff4
push eax
call fcn.00442ac0
add esp, 4
mov eax, dword [esp + 0x10]
mov edx, dword [0x4c2084]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40e2df
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40e2df
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00442ac0
add esp, 4
xor eax, eax
jmp 0x40e769
push esi
call fcn.00438160
mov cx, word [0x4c35f4]
mov edi, eax
mov ax, word [0x4d1c0c]
push eax
push ecx
push esi
call fcn.00438050
mov edx, dword [0x4c2080]
mov eax, esi
add esp, 0x10
mov dword [esp + 0x18], edx
shr eax, 0x10
jne 0x40e32a
mov eax, esi
lea ecx, [esp + 0x18]
and eax, 0xffff
push eax
call fcn.00405320
jmp 0x40e35d
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, eax
test ebp, ebp
je 0x40e35d
push ebp
lea ecx, [esp + 0x1c]
call fcn.004056f0
test eax, eax
je 0x40e35d
mov eax, dword [esp + 0x18]
lea ecx, [ebp + ebp]
push ecx
lea edx, [ebp + ebp + 2]
push esi
push edx
push eax
call fcn.00404a40
add esp, 0x10
lea ecx, [esp + 0x18]
mov byte [esp + 0x2240], 2
push ecx
mov ecx, dword [esp + 0x28]
call fcn.0040e790
lea ebp, [ebx + 0x38]
mov dword [ebx + 0x34], eax
push ebp
push edi
push esi
call fcn.004381c0
lea esi, [ebx + 0x3c]
push esi
push edi
push eax
call fcn.004381c0
mov esi, dword [esi]
mov ebp, dword [ebp]
mov ecx, 0x800
xor eax, eax
lea edi, [esp + 0x250]
add esp, 0x18
rep stosd dword es:[edi], eax
lea edx, [esp + 0x2c]
lea eax, [esp + 0x238]
push edx
mov edx, dword [ebx + 0x34]
lea ecx, [esp + 0x2c]
push eax
push ecx
push esi
push ebp
push edx
mov dword [esp + 0x40], 1
mov dword [esp + 0x44], 0x1000
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
cmp dword [esp + 0x28], 1
jne 0x40e6dd
cmp word [esp + 0x238], 0
je 0x40e6dd
mov eax, dword [esp + 0x2c]
test eax, eax
jbe 0x40e6dd
lea eax, [esp + 0x238]
lea ecx, [esp + 0x1c]
push eax
call fcn.0040a220
mov eax, dword [ebx + 0x40]
mov ecx, dword [esp + 0x1c]
mov ebp, dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea esi, [ebx + 0x40]
push eax
lea edx, [esp + 0x23c]
push ecx
push edx
mov byte [esp + 0x224c], 3
call ebp
lea eax, [esp + 0x238]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40e48b
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2240], 2
call fcn.004056c0
lea ecx, [esp + 0x18]
mov byte [esp + 0x2240], 1
call fcn.004056c0
lea ecx, [esp + 0x14]
mov byte [esp + 0x2240], 0
call fcn.004056c0
lea ecx, [esp + 0x10]
mov dword [esp + 0x2240], 0xffffffff
call fcn.004056c0
jmp 0x40e764
lea ecx, [esp + 0x1c]
lea edi, [ebx + 0x2c]
push ecx
mov ecx, edi
mov dword [ebx + 0x98], 1
call fcn.00410630
push edi
lea ecx, [ebx + 0x30]
call fcn.00410630
lea edx, [esp + 0x238]
push edx
call fcn.00405fc0
add esp, 4
test eax, eax
jne 0x40e51a
push str.0.0.0.0
lea ecx, [ebx + 0x24]
call fcn.00404c50
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2240], 2
call fcn.004056c0
lea ecx, [esp + 0x18]
mov byte [esp + 0x2240], 1
call fcn.004056c0
lea ecx, [esp + 0x14]
mov byte [esp + 0x2240], 0
call fcn.004056c0
lea ecx, [esp + 0x10]
mov dword [esp + 0x2240], 0xffffffff
call fcn.004056c0
jmp 0x40e764
mov ecx, dword [esp + 0x2248]
push str.RegVersionFile
call fcn.0040c7f0
push eax
lea ecx, [esp + 0x24]
call fcn.0040a220
mov eax, dword [esp + 0x20]
mov byte [esp + 0x2240], 4
mov ecx, dword [eax - 8]
test ecx, ecx
jne 0x40e552
push esi
lea ecx, [esp + 0x24]
call fcn.00410630
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
push ecx
lea eax, [esp + 0x23c]
push edx
push eax
call ebp
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea ecx, [esp + 0x238]
push ecx
call edi
test eax, eax
jne 0x40e58c
mov esi, dword [esi]
mov edx, dword [esp + 0x1c]
push esi
lea eax, [esp + 0x23c]
push edx
push eax
call ebp
lea ecx, [esp + 0x238]
push ecx
call fcn.00405fc0
add esp, 4
test eax, eax
jne 0x40e60a
push str.0.0.0.0
lea ecx, [ebx + 0x24]
call fcn.00404c50
lea ecx, [esp + 0x20]
mov byte [esp + 0x2240], 3
call fcn.004056c0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2240], 2
call fcn.004056c0
lea ecx, [esp + 0x18]
mov byte [esp + 0x2240], 1
call fcn.004056c0
lea ecx, [esp + 0x14]
mov byte [esp + 0x2240], 0
call fcn.004056c0
lea ecx, [esp + 0x10]
mov dword [esp + 0x2240], 0xffffffff
call fcn.004056c0
jmp 0x40e764
lea edx, [esp + 0x30]
push 0x104
lea eax, [esp + 0x23c]
push edx
push eax
call fcn.0040e840
add esp, 0xc
lea edx, [esp + 0x30]
lea ecx, [ebx + 0x24]
push edx
mov dword [esp + 0x28], ecx
call fcn.00404c50
mov esi, dword [ebx + 0x48]
mov eax, dword [ebx + 0x4c]
cmp esi, eax
je 0x40e680
mov eax, dword [esi]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x40e666
push eax
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x23c]
push eax
push ecx
call ebp
lea edx, [esp + 0x238]
push edx
call edi
test eax, eax
je 0x40e672
mov eax, dword [ebx + 0x4c]
add esi, 4
cmp esi, eax
jne 0x40e63f
jmp 0x40e680
mov ecx, dword [esp + 0x24]
push str.0.0.0.0
call fcn.00404c50
lea ecx, [esp + 0x20]
mov byte [esp + 0x2240], 3
call fcn.004056c0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2240], 2
call fcn.004056c0
lea ecx, [esp + 0x18]
mov byte [esp + 0x2240], 1
call fcn.004056c0
lea ecx, [esp + 0x14]
mov byte [esp + 0x2240], 0
call fcn.004056c0
lea ecx, [esp + 0x10]
mov dword [esp + 0x2240], 0xffffffff
call fcn.004056c0
jmp 0x40e764
mov eax, dword [esp + 0x18]
mov edx, dword [0x4c2084]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40e70e
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40e70e
mov edx, dword [esp + 0x18]
add edx, 0xfffffff4
push edx
call fcn.00442ac0
add esp, 4
mov eax, dword [esp + 0x14]
mov edx, dword [0x4c2084]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40e739
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40e739
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.00442ac0
add esp, 4
mov eax, dword [esp + 0x10]
mov edx, dword [0x4c2084]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40e764
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40e764
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00442ac0
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x2238]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2234
ret 8