Function at 0x104d3cb
Capabilities:
Query environment variable

Disassembly:
mov eax, reloc.ADVAPI32.dll_AddAccessAllowedAce
call fcn.01077868
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 0x104de4d
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.0102150d
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 0x104de88
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 0x104d474
push dword [ebp - 0x62c]
call dword [sym.imp.msvcrt.dll_free]
jmp 0x104de87
push dword [esi + 0x74]
mov ecx, esi
call fcn.0104ca69
sub eax, 0
je 0x104de66
dec eax
dec eax
je 0x104de35
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.01068091
push ebx
lea eax, [ebp - 0x110]
push eax
push 0x1771
call fcn.01068091
push ebx
lea eax, [ebp - 0xd0]
push eax
push 0x1772
call fcn.01068091
push ebx
lea eax, [ebp - 0x50]
push eax
push 0x1774
call fcn.01068091
push ebx
lea eax, [ebp - 0x90]
push eax
push 0x17d5
call fcn.01068091
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 0x104de35
call fcn.0105f850
test eax, eax
mov dword [ebp - 0x644], eax
je 0x104ddeb
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 0x104d5c8
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 0x104d5c8
push dword [ebp - 0x624]
call edi
push eax
push 0x1009a20
push dword [ebp - 0x624]
call ebx
add esp, 0x10
test eax, eax
je 0x104d5c8
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 0x104d5c8
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 0x104ddeb
mov ecx, esi
call fcn.01076094
and dword [ebp - 0x650], 0
jmp 0x104d5de
push eax
call fcn.01083d86
mov eax, dword [0x10e25b4]
mov eax, dword [eax + 4]
test eax, eax
jne 0x104d5d8
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 0x104d63a
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0xd4]
push ebx
call fcn.0103d21c
mov ecx, esi
call fcn.010584d3
mov dword [eax + 0x5c], ebx
mov dword [ebp - 0x648], ebx
jmp 0x104d911
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 0x104d88b
mov dword [0x10e2588], ebx
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0xd4]
push 2
call fcn.0103d21c
push 0x104
lea eax, [ebp - 0x620]
push eax
push 0x1009abc
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x418]
push 0x1009a98
push eax
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0xc
push 0x10e25d4
lea eax, [ebp - 0x418]
push eax
call fcn.0103a2f0
test ax, ax
je 0x104d6d8
lea eax, [ebp - 0x418]
push eax
push 0xe15
call fcn.010816e4
pop ecx
pop ecx
jmp 0x104de27
mov eax, dword [0x10e25d4]
test eax, eax
mov dword [ebp - 0x64c], ebx
je 0x104d7b1
cmp word [eax + 0x1c], 0
je 0x104d791
mov ecx, esi
call fcn.010584d3
test eax, eax
mov dword [ebp - 0x630], eax
jne 0x104d728
push 0xe27
mov dword [esi + 0x110], 0x57
call fcn.010889b4
pop ecx
push eax
push ebx
call fcn.0106223c
jmp 0x104de31
mov eax, dword [ebp - 0x630]
mov dword [eax + 0x7c], ebx
mov eax, dword [ebp - 0x628]
push 0
mov dword [eax + 0x2ac], ebx
call fcn.01077dcc
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.0104e9e6
mov word [eax + 0x3c], bx
mov eax, dword [0x10e25d4]
push dword [eax + 0x14]
push dword [ebp - 0x630]
call fcn.0101f006
jmp 0x104d7b1
call fcn.0104e9e6
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.0104fbdf
mov ecx, esi
call fcn.0105c940
test eax, eax
je 0x104d876
and dword [ebp - 0x624], 0
mov ecx, esi
call fcn.010584d3
push ebx
mov ecx, eax
mov dword [ebp - 0x630], eax
mov dword [eax + 0x5c], ebx
call fcn.0102ac08
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.0105b1f3
mov eax, dword [ebp - 0x630]
mov eax, dword [eax + 0x6c]
cmp eax, ebx
jne 0x104d814
mov dword [ebp - 0x624], ebx
jmp 0x104d821
push 2
pop ecx
cmp eax, ecx
jne 0x104d821
mov dword [ebp - 0x624], ecx
push dword [ebp - 0x624]
push dword [0x10e25bc]
push dword [0x10e25b0]
push dword [0x10e25b8]
push dword [0x10e25d4]
call fcn.0103aac5
test ax, ax
jne 0x104d864
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.0102ac08
jmp 0x104d911
push ebx
mov dword [esi + 0x110], 0x3e3
call fcn.0104c87b
jmp 0x104de31
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 0x104d8c9
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0xd4]
push ebx
call fcn.0103d21c
mov ecx, esi
call fcn.010584d3
mov dword [eax + 0x5c], ebx
jmp 0x104d911
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 0x104d8f4
mov dword [ebp - 0x650], ebx
jmp 0x104d911
push dword [ebp - 0x624]
call edi
push eax
push 0x1009a20
push dword [ebp - 0x624]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
mov ecx, esi
call fcn.0104d30a
test eax, eax
je 0x104de27
xor eax, eax
push eax
push eax
push eax
call fcn.01050ed2
add esp, 0xc
push reloc.ADVAPI32.dll_ReadEncryptedFileRaw
lea eax, [ebp - 0x210]
push eax
push 0x1775
call fcn.01068091
push reloc.ADVAPI32.dll_ReadEncryptedFileRaw
lea eax, [ebp - 0x1d0]
push eax
push 0x1776
call fcn.01068091
push reloc.ADVAPI32.dll_ReadEncryptedFileRaw
lea eax, [ebp - 0x190]
push eax
push 0x1783
call fcn.01068091
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], 0
jne 0x104dcd5
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 0x104dcd5
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], 0
jne 0x104d9bc
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.010609dc
cmp eax, 0xfffffffe
jne 0x104d974
xor eax, eax
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], ax
jne 0x104dc7a
mov ecx, dword [ebp - 0x624]
cmp word [ecx], 0x22
je 0x104db10
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], ax
jne 0x104db45
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 0x104da12
mov byte [ebp - 0x63c], CloseServiceHandle
jmp 0x104d974
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 0x104da41
mov byte [ebp - 0x63c], CloseServiceHandle
jmp 0x104d974
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 0x104da70
mov byte [ebp - 0x63c], 0x26
jmp 0x104d974
cmp byte [ebp - 0x63c], 0xff
jne 0x104daff
push ebx
push 0
push dword [ebp - 0x624]
push dword [0x10e25b0]
push dword [0x10e25b4]
call fcn.01061cf2
test eax, eax
jne 0x104d974
lea ecx, [ebp - 0x628]
call fcn.01075f2c
push dword [ebp - 0x624]
lea ecx, [ebp - 0x62c]
mov dword [ebp - 4], 2
call fcn.01075f08
push 0x4e48
lea ecx, [ebp - 0x628]
mov byte [ebp - 4], 3
call fcn.01075f5c
push dword [ebp - 0x628]
lea ecx, [ebp - 0x62c]
call fcn.01076670
test eax, eax
push dword [ebp - 0x624]
jge 0x104dc96
push 0xd2b
jmp 0x104dc9b
push dword [ebp - 0x63c]
push dword [ebp - 0x624]
jmp 0x104dc45
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], ax
jne 0x104db45
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 0x104db52
lea eax, [ebp - 0x640]
push eax
push dword [ebp - 0x624]
push dword [ebp - 0x634]
mov ecx, esi
call fcn.0104b970
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], 0
jne 0x104dc62
cmp byte [ebp - 0x63c], 0xff
jne 0x104dc39
push ebx
push 0
push dword [ebp - 0x634]
push dword [0x10e25b0]
push dword [0x10e25b4]
call fcn.01061cf2
test eax, eax
jne 0x104d974
lea ecx, [ebp - 0x638]
call fcn.01075f2c
push dword [ebp - 0x624]
and dword [ebp - 4], 0
lea ecx, [ebp - 0x630]
call fcn.01075f08
push 0x4e48
lea ecx, [ebp - 0x638]
mov byte [ebp - 4], bl
call fcn.01075f5c
push dword [ebp - 0x638]
lea ecx, [ebp - 0x630]
call fcn.01076670
test eax, eax
push dword [ebp - 0x624]
jge 0x104dccb
mov edi, 0xd2b
push edi
push ebx
push ebx
push 0
call fcn.01050ed2
push dword [ebp - 0x624]
push edi
call fcn.010816e4
add esp, 0x1c
lea ecx, [ebp - 0x630]
mov dword [esi + 0x110], CloseServiceHandle
mov byte [ebp - 4], 0
call fcn.01075ef0
lea ecx, [ebp - 0x638]
or dword [ebp - 4], 0xffffffff
call fcn.01075ef0
jmp 0x104de31
push dword [ebp - 0x63c]
push dword [ebp - 0x634]
push dword [0x10e25b0]
push dword [0x10e25b4]
call fcn.01060fd6
mov byte [ebp - 0x63c], CompareStringW
jmp 0x104d974
push 0x100549c
push dword [ebp - 0x634]
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
jmp 0x104d974
push dword [ebp - 0x624]
push 0xa9
push ebx
push ebx
push 0
call fcn.01050ed2
add esp, 0x14
jmp 0x104de31
push 0xd3b
push ebx
push ebx
push 0
call fcn.01050ed2
add esp, 0x14
lea ecx, [ebp - 0x62c]
mov dword [esi + 0x110], CloseServiceHandle
mov byte [ebp - 4], 2
call fcn.01075ef0
lea ecx, [ebp - 0x628]
jmp 0x104dc2b
mov edi, 0xd3b
jmp 0x104dbf3
call fcn.0102150d
xor edi, edi
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], di
mov word [eax + reloc.ADVAPI32.dll_RegDeleteValueW], 2
je 0x104dd19
mov eax, dword [ebp - 0x644]
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x104dd10
cmp eax, ebx
je 0x104dd10
push 0xab
push ebx
push ebx
push edi
call fcn.01050ed2
add esp, 0x10
mov eax, dword [ebp - 0x644]
mov dword [eax + 4], ebx
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], di
jne 0x104dd58
push dword [ebp - 0x644]
push dword [0x10e25b4]
call fcn.010610c0
test eax, eax
jne 0x104dd58
push 0xe27
call fcn.010889b4
pop ecx
push eax
push ebx
call fcn.0106223c
mov dword [esi + 0x110], CloseServiceHandle
jmp 0x104de31
lea eax, [ebp - 0x644]
push eax
call fcn.0105f86d
call fcn.0102150d
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], di
mov word [eax + reloc.ADVAPI32.dll_RegDeleteValueW], 2
push ebx
je 0x104dd83
push 0x3ee
jmp 0x104dda8
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], di
je 0x104dd93
push 0x3ea
jmp 0x104dda8
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], di
je 0x104dda3
push 0x3f3
jmp 0x104dda8
push 0x3e9
mov ecx, esi
call fcn.0104d1ca
cmp word [reloc.ADVAPI32.dll_RegDeleteValueW], di
je 0x104ddd1
cmp word [ebp - reloc.ADVAPI32.dll_RegDeleteValueW], di
je 0x104ddc7
push edi
call fcn.0104c87b
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 0x104de31
xor eax, eax
push eax
push eax
push eax
call fcn.01050ed2
push dword [ebp - 0x624]
mov edi, 0xdc7
push edi
xor ebx, ebx
inc ebx
push ebx
push ebx
push 0
call fcn.01050ed2
push dword [ebp - 0x624]
push edi
call fcn.010816e4
push 0
push 8
push 0
call fcn.01050ed2
add esp, 0x34
mov dword [esi + 0x110], 0x57
mov eax, ebx
jmp 0x104de4f
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.01075bbb
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 0x104de4f