Function at 0x104d3b0
Capabilities:
Query environment variable

Disassembly:
mov eax, reloc.ADVAPI32.dll_AddAccessAllowedAce
call fcn.01077798
sub esp, 0x644
mov eax, dword [0x10de03c]
push ebx
push esi
mov dword [ebp - 0x10], eax
mov esi, ecx
xor eax, eax
cmp dword [esi + 0x74], eax
push edi
je 0x104de32
mov dword [ebp - 0x644], eax
mov dword [ebp - 0x640], eax
mov byte [ebp - 0x63c], CompareStringW
mov dword [ebp - 0x638], eax
mov dword [ebp - 0x648], eax
mov dword [ebp - 0x64c], eax
call fcn.01021462
push dword [esi + 0x74]
mov edi, dword [sym.imp.msvcrt.dll_wcslen]
mov dword [ebp - 0x628], eax
call edi
mov ebx, dword [sym.imp.msvcrt.dll_malloc]
lea eax, [eax + eax + 2]
push eax
call ebx
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x62c], eax
je 0x104de6d
push dword [esi + 0x74]
call edi
lea eax, [eax + eax + 2]
push eax
call ebx
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x634], eax
jne 0x104d459
push dword [ebp - 0x62c]
call dword [sym.imp.msvcrt.dll_free]
jmp 0x104de6c
push dword [esi + 0x74]
mov ecx, esi
call fcn.0104ca6a
sub eax, 0
je 0x104de4b
dec eax
dec eax
je 0x104de1a
push dword [esi + 0x74]
push dword [ebp - 0x62c]
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push 0x20
pop ebx
push ebx
lea eax, [ebp - 0x150]
push eax
push 0x1770
call fcn.01067f86
push ebx
lea eax, [ebp - 0x110]
push eax
push 0x1771
call fcn.01067f86
push ebx
lea eax, [ebp - 0xd0]
push eax
push 0x1772
call fcn.01067f86
push ebx
lea eax, [ebp - 0x50]
push eax
push 0x1774
call fcn.01067f86
push ebx
lea eax, [ebp - 0x90]
push eax
push 0x17d5
call fcn.01067f86
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x62c]
call dword [sym.imp.msvcrt.dll_wcstok]
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
mov dword [ebp - 0x624], ebx
je 0x104de1a
call fcn.0105f7d2
test eax, eax
mov dword [ebp - 0x644], eax
je 0x104ddd0
push ebx
call edi
push eax
lea eax, [ebp - 0x150]
push eax
push ebx
mov ebx, dword [sym.imp.msvcrt.dll__wcsnicmp]
call ebx
add esp, 0x10
test eax, eax
je 0x104d5ad
push dword [ebp - 0x624]
call edi
push eax
lea eax, [ebp - 0xd0]
push eax
push dword [ebp - 0x624]
call ebx
add esp, 0x10
test eax, eax
je 0x104d5ad
push dword [ebp - 0x624]
call edi
push eax
push 0x1009a18
push dword [ebp - 0x624]
call ebx
add esp, 0x10
test eax, eax
je 0x104d5ad
push dword [ebp - 0x624]
call edi
push eax
lea eax, [ebp - 0x90]
push eax
push dword [ebp - 0x624]
call ebx
add esp, 0x10
test eax, eax
je 0x104d5ad
push dword [ebp - 0x624]
call edi
push eax
lea eax, [ebp - 0x110]
push eax
push dword [ebp - 0x624]
call ebx
add esp, 0x10
test eax, eax
jne 0x104ddd0
mov ecx, esi
call fcn.01075fc8
and dword [ebp - 0x650], 0
jmp 0x104d5c3
push eax
call fcn.01083c94
mov eax, dword [0x10e25b4]
mov eax, dword [eax + 4]
test eax, eax
jne 0x104d5bd
push dword [ebp - 0x624]
and dword [0x10e2588], eax
call edi
push eax
lea eax, [ebp - 0x90]
push eax
push dword [ebp - 0x624]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
xor ebx, ebx
add esp, 0x10
inc ebx
test eax, eax
jne 0x104d61f
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0xd4]
push ebx
call fcn.0103d1fc
mov ecx, esi
call fcn.010584c0
mov dword [eax + 0x5c], ebx
mov dword [ebp - 0x648], ebx
jmp 0x104d8f6
push dword [ebp - 0x624]
call edi
push eax
lea eax, [ebp - 0xd0]
push eax
push dword [ebp - 0x624]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jne 0x104d870
mov dword [0x10e2588], ebx
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0xd4]
push 2
call fcn.0103d1fc
push 0x104
lea eax, [ebp - 0x620]
push eax
push 0x1009ab4
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x418]
push 0x1009a90
push eax
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0xc
push 0x10e25d4
lea eax, [ebp - 0x418]
push eax
call fcn.0103a2aa
test ax, ax
je 0x104d6bd
lea eax, [ebp - 0x418]
push eax
push 0xe15
call fcn.010815f2
pop ecx
pop ecx
jmp 0x104de0c
mov eax, dword [0x10e25d4]
test eax, eax
mov dword [ebp - 0x64c], ebx
je 0x104d796
cmp word [eax + 0x1c], 0
je 0x104d776
mov ecx, esi
call fcn.010584c0
test eax, eax
mov dword [ebp - 0x630], eax
jne 0x104d70d
push 0xe27
mov dword [esi + 0x110], 0x57
call fcn.01088826
pop ecx
push eax
push ebx
call fcn.01062131
jmp 0x104de16
mov eax, dword [ebp - 0x630]
mov dword [eax + 0x7c], ebx
mov eax, dword [ebp - 0x628]
push 0
mov dword [eax + 0x2ac], ebx
call fcn.01077cfc
mov eax, dword [0x10e25d4]
push 0x104
push dword [eax + 0x14]
mov eax, dword [ebp - 0x628]
add eax, 0xa2
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
mov eax, dword [ebp - 0x628]
add esp, 0xc
mov word [eax + reloc.ADVAPI32.dll_RegDeleteValueW], bx
call fcn.0104e9a5
mov word [eax + 0x3c], bx
mov eax, dword [0x10e25d4]
push dword [eax + 0x14]
push dword [ebp - 0x630]
call fcn.0101ef66
jmp 0x104d796
call fcn.0104e9a5
and word [eax + 0x3c], 0
mov word [eax + 0x3e], bx
mov eax, dword [ebp - 0x628]
mov word [eax + reloc.ADVAPI32.dll_RegDeleteValueW], bx
call fcn.0104fb9e
mov ecx, esi
call fcn.0105c92d
test eax, eax
je 0x104d85b
and dword [ebp - 0x624], 0
mov ecx, esi
call fcn.010584c0
push ebx
mov ecx, eax
mov dword [ebp - 0x630], eax
mov dword [eax + 0x5c], ebx
call fcn.0102aacf
mov eax, dword [ebp - 0x630]
mov dword [eax + 0x14], ebx
mov eax, dword [ebp - 0x628]
and word [eax + reloc.ADVAPI32.dll_RegDeleteValueW], 0
push 2
mov ecx, esi
call fcn.0105b1e0
mov eax, dword [ebp - 0x630]
mov eax, dword [eax + 0x6c]
cmp eax, ebx
jne 0x104d7f9
mov dword [ebp - 0x624], ebx
jmp 0x104d806
push 2
pop ecx
cmp eax, ecx
jne 0x104d806
mov dword [ebp - 0x624], ecx
push dword [ebp - 0x624]
push dword [0x10e25bc]
push dword [0x10e25b0]
push dword [0x10e25b8]
push dword [0x10e25d4]
call fcn.0103aa7f
test ax, ax
jne 0x104d849
mov eax, dword [ebp - 0x628]
mov dword [ebp - 0x638], ebx
mov dword [eax + 0xbec], ebx
mov word [eax + reloc.ADVAPI32.dll_RegDeleteValueW], 4
mov ecx, dword [ebp - 0x630]
push 0
call fcn.0102aacf
jmp 0x104d8f6
push ebx
mov dword [esi + 0x110], 0x3e3
call fcn.0104c87c
jmp 0x104de16
push dword [ebp - 0x624]
call edi
push eax
lea eax, [ebp - 0x150]
push eax
push dword [ebp - 0x624]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jne 0x104d8ae
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0xd4]
push ebx
call fcn.0103d1fc
mov ecx, esi
call fcn.010584c0
mov dword [eax + 0x5c], ebx
jmp 0x104d8f6
push dword [ebp - 0x624]
call edi
push eax
lea eax, [ebp - 0x110]
push eax
push dword [ebp - 0x624]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jne 0x104d8d9
mov dword [ebp - 0x650], ebx
jmp 0x104d8f6
push dword [ebp - 0x624]
call edi
push eax
push 0x1009a18
push dword [ebp - 0x624]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
mov ecx, esi
call fcn.0104d2ef
test eax, eax
je 0x104de0c
xor eax, eax
push eax
push eax
push eax
call fcn.01050ebf
add esp, 0xc
push reloc.ADVAPI32.dll_ReadEncryptedFileRaw
lea eax, [ebp - 0x210]
push eax
push 0x1775
call fcn.01067f86
push reloc.ADVAPI32.dll_ReadEncryptedFileRaw
lea eax, [ebp - 0x1d0]
push eax
push 0x1776
call fcn.01067f86
push reloc.ADVAPI32.dll_ReadEncryptedFileRaw
lea eax, [ebp - 0x190]
push eax
push 0x1783
call fcn.01067f86
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], 0
jne 0x104dcba
lea eax, [ebp - 0x50]
push eax
push 0
call dword [sym.imp.msvcrt.dll_wcstok]
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x624], eax
je 0x104dcba
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], 0
jne 0x104d9a1
movsx eax, word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW]
push eax
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x624]
push dword [ebp - 0x644]
call fcn.010608d1
cmp eax, 0xfffffffe
jne 0x104d959
xor eax, eax
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], ax
jne 0x104dc5f
mov ecx, dword [ebp - 0x624]
cmp word [ecx], 0x22
je 0x104daf5
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], ax
jne 0x104db2a
push ecx
call edi
push eax
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x624]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jne 0x104d9f7
mov byte [ebp - 0x63c], CloseServiceHandle
jmp 0x104d959
push dword [ebp - 0x624]
call edi
push eax
lea eax, [ebp - 0x1d0]
push eax
push dword [ebp - 0x624]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jne 0x104da26
mov byte [ebp - 0x63c], CloseServiceHandle
jmp 0x104d959
push dword [ebp - 0x624]
call edi
push eax
lea eax, [ebp - 0x190]
push eax
push dword [ebp - 0x624]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jne 0x104da55
mov byte [ebp - 0x63c], 0x26
jmp 0x104d959
cmp byte [ebp - 0x63c], 0xff
jne 0x104dae4
push ebx
push 0
push dword [ebp - 0x624]
push dword [0x10e25b0]
push dword [0x10e25b4]
call fcn.01061be7
test eax, eax
jne 0x104d959
lea ecx, [ebp - 0x628]
call fcn.01075e60
push dword [ebp - 0x624]
lea ecx, [ebp - 0x62c]
mov dword [ebp - 4], 2
call fcn.01075e3c
push 0x4e48
lea ecx, [ebp - 0x628]
mov byte [ebp - 4], 3
call fcn.01075e90
push dword [ebp - 0x628]
lea ecx, [ebp - 0x62c]
call fcn.010765a4
test eax, eax
push dword [ebp - 0x624]
jge 0x104dc7b
push 0xd2b
jmp 0x104dc80
push dword [ebp - 0x63c]
push dword [ebp - 0x624]
jmp 0x104dc2a
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], ax
jne 0x104db2a
push 0x100205c
push dword [ebp - 0x634]
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
lea eax, [ebp - 0x640]
push eax
mov eax, dword [ebp - 0x624]
add eax, 2
mov dword [ebp - 0x640], ebx
push eax
jmp 0x104db37
lea eax, [ebp - 0x640]
push eax
push dword [ebp - 0x624]
push dword [ebp - 0x634]
mov ecx, esi
call fcn.0104b971
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], 0
jne 0x104dc47
cmp byte [ebp - 0x63c], 0xff
jne 0x104dc1e
push ebx
push 0
push dword [ebp - 0x634]
push dword [0x10e25b0]
push dword [0x10e25b4]
call fcn.01061be7
test eax, eax
jne 0x104d959
lea ecx, [ebp - 0x638]
call fcn.01075e60
push dword [ebp - 0x624]
and dword [ebp - 4], 0
lea ecx, [ebp - 0x630]
call fcn.01075e3c
push 0x4e48
lea ecx, [ebp - 0x638]
mov byte [ebp - 4], bl
call fcn.01075e90
push dword [ebp - 0x638]
lea ecx, [ebp - 0x630]
call fcn.010765a4
test eax, eax
push dword [ebp - 0x624]
jge 0x104dcb0
mov edi, 0xd2b
push edi
push ebx
push ebx
push 0
call fcn.01050ebf
push dword [ebp - 0x624]
push edi
call fcn.010815f2
add esp, 0x1c
lea ecx, [ebp - 0x630]
mov dword [esi + 0x110], CloseServiceHandle
mov byte [ebp - 4], 0
call fcn.01075e24
lea ecx, [ebp - 0x638]
or dword [ebp - 4], 0xffffffff
call fcn.01075e24
jmp 0x104de16
push dword [ebp - 0x63c]
push dword [ebp - 0x634]
push dword [0x10e25b0]
push dword [0x10e25b4]
call fcn.01060ecb
mov byte [ebp - 0x63c], CompareStringW
jmp 0x104d959
push 0x100549c
push dword [ebp - 0x634]
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
jmp 0x104d959
push dword [ebp - 0x624]
push 0xa9
push ebx
push ebx
push 0
call fcn.01050ebf
add esp, 0x14
jmp 0x104de16
push 0xd3b
push ebx
push ebx
push 0
call fcn.01050ebf
add esp, 0x14
lea ecx, [ebp - 0x62c]
mov dword [esi + 0x110], CloseServiceHandle
mov byte [ebp - 4], 2
call fcn.01075e24
lea ecx, [ebp - 0x628]
jmp 0x104dc10
mov edi, 0xd3b
jmp 0x104dbd8
call fcn.01021462
xor edi, edi
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], di
mov word [eax + reloc.ADVAPI32.dll_RegDeleteValueW], 2
je 0x104dcfe
mov eax, dword [ebp - 0x644]
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x104dcf5
cmp eax, ebx
je 0x104dcf5
push 0xab
push ebx
push ebx
push edi
call fcn.01050ebf
add esp, 0x10
mov eax, dword [ebp - 0x644]
mov dword [eax + 4], ebx
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], di
jne 0x104dd3d
push dword [ebp - 0x644]
push dword [0x10e25b4]
call fcn.01060fb5
test eax, eax
jne 0x104dd3d
push 0xe27
call fcn.01088826
pop ecx
push eax
push ebx
call fcn.01062131
mov dword [esi + 0x110], CloseServiceHandle
jmp 0x104de16
lea eax, [ebp - 0x644]
push eax
call fcn.0105f7ef
call fcn.01021462
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], di
mov word [eax + reloc.ADVAPI32.dll_RegDeleteValueW], 2
push ebx
je 0x104dd68
push 0x3ee
jmp 0x104dd8d
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], di
je 0x104dd78
push 0x3ea
jmp 0x104dd8d
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], di
je 0x104dd88
push 0x3f3
jmp 0x104dd8d
push 0x3e9
mov ecx, esi
call fcn.0104d1af
cmp word [reloc.ADVAPI32.dll_RegDeleteValueW], di
je 0x104ddb6
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], di
je 0x104ddac
push edi
call fcn.0104c87c
mov dword [esi + 0x110], CloseServiceHandle
push dword [ebp - 0x62c]
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
push dword [ebp - 0x634]
call esi
pop ecx
pop ecx
jmp 0x104de16
xor eax, eax
push eax
push eax
push eax
call fcn.01050ebf
push dword [ebp - 0x624]
mov edi, 0xdc7
push edi
xor ebx, ebx
inc ebx
push ebx
push ebx
push 0
call fcn.01050ebf
push dword [ebp - 0x624]
push edi
call fcn.010815f2
push 0
push 8
push 0
call fcn.01050ebf
add esp, 0x34
mov dword [esi + 0x110], 0x57
mov eax, ebx
jmp 0x104de34
push dword [ebp - 0x62c]
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
push dword [ebp - 0x634]
call esi
pop ecx
pop ecx
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop ebx
call fcn.01075aef
leave
ret
push dword [ebp - 0x62c]
mov edi, dword [sym.imp.msvcrt.dll_free]
call edi
push dword [ebp - 0x634]
call edi
pop ecx
mov dword [esi + 0x110], 0x57
pop ecx
xor eax, eax
inc eax
jmp 0x104de34