Function at 0x407523
Capabilities:
Get common file path
Query or enumerate registry value
Set current directory

Disassembly:
push ebp
lea ebp, [esp - 0x258]
sub esp, 0x2d8
mov eax, dword [0x419010]
xor eax, ebp
mov dword [ebp + 0x254], eax
push ebx
push esi
push edi
call dword [0x419018]
or dword [ebp + 0x30], 0xffffffff
xor ebx, ebx
xor edi, edi
push ebx
inc edi
push 0x419aac
mov dword [ebp + 0x2c], eax
mov dword [ebp + 0x38], ebx
mov dword [ebp + 0x28], ebx
mov dword [ebp + 0x18], edi
mov dword [ebp + 0x1c], 4
mov dword [ebp + 0x20], 5
mov dword [ebp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push dword [ebp + 0x264]
mov esi, 0x41a018
push dword [ebp + 0x260]
call fcn.0040e5e4
cmp eax, ebx
mov dword [ebp + 0x44], eax
jl 0x407e2a
mov edx, dword [0x41a038]
push 0x41a03c
call fcn.0040dfbd
test eax, eax
jge 0x4075ba
mov dword [0x419de8], edi
mov dword [0x41a070], edi
cmp dword [0x419ddc], ebx
je 0x4075c9
push ebx
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov eax, esi
call fcn.0040e669
test eax, eax
jge 0x4075e0
mov dword [0x419de8], edi
mov dword [0x41a070], edi
lea eax, [ebp + 0x3c]
push eax
push 0x4048d8
push 0x4049b8
call fcn.0040dde6
test eax, eax
jne 0x40768a
mov esi, dword [0x41a114]
cmp esi, ebx
je 0x40768a
mov ebx, dword [sym.imp.MSVCR80.dll__wcsicmp]
push dword [esi]
push 0x404a08
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x40762e
mov dword [0x41a09c], edi
mov eax, dword [esi + 4]
mov dword [0x41a0a0], eax
jmp 0x407681
push dword [esi]
push 0x404a0c
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x40764d
mov dword [0x41a0a4], edi
mov eax, dword [esi + 4]
mov dword [0x41a0a8], eax
jmp 0x407681
push dword [esi]
push 0x404a10
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x40766c
mov dword [0x41a0a4], edi
mov eax, dword [esi + 4]
mov dword [0x41a0ac], eax
jmp 0x407681
push dword [esi]
push 0x404a1c
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x407681
mov dword [0x41a0b0], edi
mov esi, dword [esi + 8]
test esi, esi
jne 0x40760f
xor ebx, ebx
call fcn.0040e98a
cmp eax, ebx
mov dword [ebp + 0x44], eax
jl 0x407e2a
cmp dword [0x41a080], ebx
mov dword [ebp + 0x28], edi
je 0x407708
cmp dword [0x419e00], ebx
je 0x4076f6
push 0x38
call fcn.004138d8
cmp eax, ebx
pop ecx
je 0x4076c0
call fcn.0040b900
jmp 0x4076c2
xor eax, eax
cmp eax, ebx
mov dword [0x419dc8], eax
je 0x407ea1
mov edx, dword [0x419e04]
push 0x41a094
mov ecx, eax
call fcn.0040b9a0
test eax, eax
jl 0x407ea1
push dword [0x419dc8]
call fcn.0040c10a
jmp 0x4076fb
call fcn.0040c13c
test eax, eax
jl 0x407ea1
jmp 0x40791a
lea eax, [ebp + 0x34]
push eax
push 0x20019
push ebx
push str.Msxml2.DOMDocument.6.0
push SysReAllocStringLen
mov dword [ebp + 0x34], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x407e16
cmp dword [ebp + 0x34], ebx
je 0x407e16
push dword [ebp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x419e00], ebx
jne 0x40779a
mov esi, dword [0x41a03c]
mov dword [ebp + 0x40], ebx
jmp 0x40777c
cmp dword [0x419e00], ebx
jne 0x407780
mov ecx, dword [esi]
lea edx, [ebp + 0x40]
call fcn.0040d178
test eax, eax
jl 0x407779
mov eax, dword [ebp + 0x40]
mov dword [ebp + 0x40], ebx
mov dword [0x419e04], eax
mov dword [0x419e00], edi
mov esi, dword [esi + 0x18]
cmp esi, ebx
jne 0x407752
push dword [ebp + 0x40]
mov ebx, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call ebx
cmp dword [0x419e00], 0
je 0x40791a
jmp 0x4077a0
mov ebx, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push 0x38
call fcn.004138d8
xor esi, esi
cmp eax, esi
pop ecx
je 0x4077b5
call fcn.0040b900
jmp 0x4077b7
xor eax, eax
cmp eax, esi
mov dword [0x419dc8], eax
jne 0x4077cc
mov dword [ebp + 0x44], 0x8007000e
jmp 0x407e2a
mov edx, dword [0x419e04]
push 0x41a094
mov ecx, eax
call fcn.0040b9a0
cmp eax, esi
mov dword [ebp + 0x44], eax
jge 0x4077f1
mov dword [ebp + 0x38], 0xbff
jmp 0x407e24
lea eax, [ebp + 0x3c]
push eax
push dword [0x419dc8]
call fcn.0040bfce
cmp eax, esi
mov dword [ebp + 0x44], eax
jl 0x407e2a
cmp dword [ebp + 0x3c], esi
je 0x4078b2
call fcn.00408907
cmp dword [0x419aac], esi
je 0x407ea1
push 0x104
lea eax, [ebp + 0x48]
push eax
push esi
mov dword [ebp + 0x40], esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x40784b
push esi
mov dword [ebp + 0x44], 0x80004005
call ebx
jmp 0x407e2a
push dword [0x419e04]
lea ecx, [ebp + 0x38]
call fcn.004092df
mov esi, dword [eax]
lea eax, [ebp + 0x48]
push eax
lea ecx, [ebp + 0x3c]
call fcn.004092df
mov eax, dword [eax]
lea ecx, [ebp + 0x40]
push ecx
push esi
push eax
push 0xbfe
push dword [0x419aac]
call fcn.0040e8b2
push dword [ebp + 0x3c]
mov esi, eax
call ebx
push dword [ebp + 0x38]
call ebx
test esi, esi
je 0x4078a8
mov ebx, dword [ebp + 0x40]
mov ecx, dword [0x419aac]
push 0xbb8
call fcn.0040e713
mov ebx, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push dword [ebp + 0x40]
call ebx
jmp 0x407ea1
lea eax, [ebp + 0x3c]
push eax
xor esi, esi
call fcn.0040c417
test eax, eax
mov dword [ebp + 0x44], eax
jge 0x4078cc
push esi
call ebx
jmp 0x407e24
cmp dword [ebp + 0x3c], 0
jne 0x407917
mov esi, dword [0x419dc8]
and dword [ebp + 0x3c], 0
add esi, 0x28
lea edi, [ebp + 0x3c]
call fcn.0040d12d
test eax, eax
mov dword [ebp + 0x44], eax
jge 0x4078f3
push dword [ebp + 0x3c]
jmp 0x4078c5
mov esi, dword [ebp + 0x3c]
push esi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
xor edi, edi
test eax, eax
jbe 0x407916
mov eax, esi
xor esi, esi
mov dword [0x419df0], eax
mov dword [0x419dec], 1
inc edi
push esi
call ebx
mov eax, dword [0x41a094]
test eax, eax
jne 0x4079d6
cmp dword [0x419de0], eax
jne 0x40799f
lea ebx, [ebp + 0x14c]
call fcn.004073da
cmp byte [ebp + 0x14c], 0
je 0x407996
mov eax, ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
cmp esi, 0x3fffffff
jle 0x40795b
xor eax, eax
jmp 0x407976
lea eax, [esi + esi]
call fcn.00416a60
mov eax, esp
push dword [ebp + 0x2c]
lea ecx, [ebp + 0x14c]
push esi
push ecx
push eax
call fcn.004092a8
push 0x103
push eax
push 0x104
mov esi, 0x41bbb0
push esi
call dword [sym.imp.MSVCR80.dll_wcsncpy_s]
add esp, 0x10
mov dword [0x419de0], esi
cmp dword [0x419de0], 0
je 0x4079cc
push dword [0x419de0]
mov esi, 0x41b3b0
push 0x404910
push 0x404a28
push 0x3ff
push 0x400
push esi
call dword [sym.imp.MSVCR80.dll__snwprintf_s]
add esp, 0x18
mov eax, esi
jmp 0x4079d1
mov eax, 0x4048d8
mov dword [0x41a094], eax
lea edx, [ebp - 0xc]
mov dword [ebp - 0xc], 0xbb8
mov dword [ebp - 8], 0x1a60
mov dword [ebp - 4], 0x1a61
mov dword [ebp], 0x1a5e
mov dword [ebp + 4], 0x1a5f
mov dword [ebp + 8], 0x1a62
mov dword [ebp + 0xc], 0x1a63
mov dword [ebp + 0x10], 0x1a64
mov dword [ebp + 0x14], 0x1a65
call fcn.0040ffc3
mov eax, dword [0x41a094]
xor esi, esi
cmp eax, esi
je 0x407a50
cmp word [eax], si
je 0x407a50
push 0x41a38c
push 0x41a388
push 0x4102e0
mov dword [0x41a39c], eax
call sub.mscoree.dll_LockClrVersion
mov dword [ebp + 0x44], eax
mov eax, dword [0x41a094]
jmp 0x407a57
mov dword [ebp + 0x44], 0x80070057
cmp dword [ebp + 0x44], esi
jl 0x407e2a
push 9
push 0x404a94
push eax
call dword [sym.imp.MSVCR80.dll__wcsnicmp]
add esp, 0xc
test eax, eax
mov eax, dword [0x41a094]
jne 0x407a82
lea ecx, [eax + 0x10]
mov dword [ebp + 0x3c], ecx
jmp 0x407a85
mov dword [ebp + 0x3c], eax
cmp dword [0x419e08], esi
mov ebx, 0x41a0b8
je 0x407aab
push 0x41a0b8
push dword [0x419e0c]
call dword [sym.imp.ole32.dll_IIDFromString]
mov dword [0x41a088], edi
jmp 0x407b1d
lea ecx, [ebp + 0x40]
push ecx
push 0x20019
push esi
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x407b12
lea eax, [ebp + 0x2c]
push eax
lea eax, [ebp + 0x48]
push eax
lea eax, [ebp + 0x44]
push eax
push esi
push 0x404aa8
push dword [ebp + 0x40]
mov dword [ebp + 0x2c], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x407afc
push 0x41a0b8
lea eax, [ebp + 0x48]
push eax
call dword [sym.imp.ole32.dll_IIDFromString]
jmp 0x407b07
mov esi, 0x4028b8
mov edi, ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push dword [ebp + 0x40]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x407b1d
mov esi, 0x4028b8
mov edi, ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
cmp dword [0x419dfc], 0
mov esi, 0x4028b8
mov edi, 0x41a0c8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
je 0x407b62
push 4
pop ecx
mov edi, 0x4028b8
mov esi, ebx
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x407b62
mov edx, dword [0x41a03c]
mov ecx, dword [0x419aac]
push ebx
call fcn.0040ed7d
test eax, eax
jl 0x407b62
mov dword [ebp + 0x44], eax
jmp 0x407e24
mov ecx, dword [0x41a094]
and dword [ebp + 0x40], 0
lea edx, [ebp + 0x40]
call fcn.0040f3a6
test eax, eax
mov dword [ebp + 0x44], eax
jl 0x407e2a
cmp dword [ebp + 0x40], 0
jne 0x407e24
call fcn.00408e03
mov dword [ebp + 0x44], eax
mov eax, dword [0x41a118]
test eax, eax
je 0x4077c0
mov ecx, dword [eax]
push eax
call dword [ecx + 4]
mov esi, 0x404d80
lea edi, [ebp - 0x80]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [0x41a118]
add edi, 0x1f4
lea esi, [ebp - 0x80]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor esi, esi
cmp dword [0x41a084], esi
je 0x407be3
push dword [0x41a094]
lea ecx, [ebp + 0x18]
call fcn.004107ea
mov dword [ebp + 0x30], esi
jmp 0x407e24
cmp dword [0x41a080], esi
jne 0x407c35
cmp dword [0x419dcc], esi
je 0x407c35
push 0x404ad0
lea eax, [ebp + 0x40]
push 0x404ad4
push eax
mov dword [ebp + 0x40], esi
call dword [sym.imp.MSVCR80.dll_fopen_s]
add esp, 0xc
cmp dword [ebp + 0x40], esi
je 0x407e24
push 0x404ae0
push dword [ebp + 0x40]
call dword [sym.imp.MSVCR80.dll_fprintf]
push dword [ebp + 0x40]
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 0xc
jmp 0x407e24
mov ecx, dword [ebp + 0x3c]
call fcn.0040dd1a
mov ecx, dword [ebp + 0x3c]
call fcn.0040dd1a
test eax, eax
jne 0x407c5c
mov dword [ebp + 0x44], 0x80004005
mov dword [ebp + 0x38], 0xbef
jmp 0x407e2a
push 0x419e10
push 0x104
mov dword [0x41a0b4], 0x41a120
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x407c9e
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x407c8d
call esi
jmp 0x407b5a
call esi
and eax, 0xffff
or eax, 0x80070000
jmp 0x407b5a
push dword [0x41a0b4]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x407c7a
mov eax, dword [0x41a118]
mov dword [0x41a0d8], eax
mov dword [eax + 0x1e4], 0x1f4
mov eax, dword [0x41a118]
mov dword [eax + 0x1e8], esi
mov eax, dword [0x41a118]
mov dword [eax + 0x1ec], esi
call fcn.00408971
cmp eax, esi
mov dword [ebp + 0x44], eax
jl 0x407e2a
cmp dword [0x41a080], esi
jne 0x407d1a
cmp dword [0x41a070], esi
jne 0x407d1a
push dword [0x41a094]
call fcn.0040f6bf
test eax, eax
jne 0x407d1a
mov dword [ebp + 0x44], 0x80004005
mov dword [ebp + 0x38], 0xbea
jmp 0x407e2a
mov eax, dword [0x41a118]
push dword [eax + 0x1ec]
lea eax, [ebp - 0x70]
push eax
push dword [0x41a094]
mov dword [ebp - 0x70], 0x19f0
mov dword [ebp - 0x6c], 0x1a10
mov dword [ebp - 0x68], 0x1a11
mov dword [ebp - 0x64], 0x19e8
mov dword [ebp - 0x60], 0x19fa
mov dword [ebp - 0x5c], 0x19fb
mov dword [ebp - 0x58], 0x19fc
mov dword [ebp - 0x54], 0x19fd
mov dword [ebp - 0x50], 0x19fe
mov dword [ebp - 0x4c], 0x19ff
mov dword [ebp - 0x48], 0x1a00
mov dword [ebp - 0x44], 0x1a01
mov dword [ebp - 0x40], 0x1a02
mov dword [ebp - 0x3c], 0x1a03
mov dword [ebp - 0x38], 0x1a04
mov dword [ebp - 0x34], 0x1a05
mov dword [ebp - 0x30], 0x1a06
mov dword [ebp - 0x2c], 0x1a07
mov dword [ebp - 0x28], 0x1a08
mov dword [ebp - 0x24], 0x1a09
mov dword [ebp - 0x20], 0x1a0a
mov dword [ebp - 0x1c], 0x1a0b
mov dword [ebp - 0x18], 0x1a0c
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], 0x1a0f
call fcn.00411543
cmp dword [0x419dd0], esi
jne 0x407def
cmp dword [0x41a080], esi
je 0x407df4
call fcn.00411dd7
lea eax, [ebp + 0x30]
push eax
mov ecx, 0x41a018
call fcn.0040e478
test eax, eax
jne 0x407e24
mov dword [ebp + 0x44], 0x80004005
mov dword [ebp + 0x38], 0xbeb
jmp 0x407e2a
mov dword [ebp + 0x38], 0xc01
mov dword [ebp + 0x44], 0x80004005
cmp dword [ebp + 0x44], 0
jge 0x407ea1
call dword [0x419018]
cmp dword [0x41a094], 0
jne 0x407e43
mov dword [0x41a094], 0x4048d8
call fcn.00408907
mov esi, dword [0x419aac]
test esi, esi
je 0x407e8c
cmp dword [ebp + 0x38], 0
jne 0x407e82
cmp dword [ebp + 0x44], 0x8007000e
je 0x407e7b
xor eax, eax
cmp dword [ebp + 0x44], 0x80070057
sete al
dec eax
and eax, 3
add eax, 0xbeb
mov dword [ebp + 0x38], eax
jmp 0x407e82
mov dword [ebp + 0x38], 0xbed
push dword [ebp + 0x38]
push 0xbb8
jmp 0x407e9c
mov esi, dword [0x419aa8]
push 0x19e7
push 0x19e6
call fcn.0040e6be
mov eax, dword [0x41a114]
xor edi, edi
cmp eax, edi
mov esi, eax
je 0x407ebe
mov esi, dword [esi + 8]
push eax
call sub.MSVCR80.dll_free
cmp esi, edi
pop ecx
mov eax, esi
jne 0x407eae
cmp dword [ebp + 0x28], edi
mov esi, dword [0x41a01c]
mov dword [0x41a114], edi
je 0x407ed5
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp esi, edi
je 0x407ef9
push 0x405e0c
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, edi
jne 0x407ef5
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
call esi
jmp 0x407ef9
push edi
call eax
pop ecx
mov eax, dword [0x41a384]
cmp eax, edi
je 0x407f0e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [0x41a384], edi
mov eax, dword [0x41a390]
cmp eax, edi
je 0x407f23
mov dword [0x41a390], edi
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [0x41a394]
cmp eax, edi
je 0x407f38
mov dword [0x41a394], edi
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [0x41a398]
cmp eax, edi
je 0x407f4d
mov ecx, dword [eax]
push eax
mov dword [0x41a398], edi
call dword [ecx + 8]
cmp word [0x419e10], di
je 0x407f61
push 0x419e10
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [ebp + 0x30]
lea esp, [ebp - 0x8c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x254]
xor ecx, ebp
call fcn.00413c2a
add ebp, 0x258
leave
ret 8