Function at 0x1009a02
Capabilities:
Query environment variable
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x964
mov eax, dword [0x1010368]
mov dword [ebp - 4], eax
lea edx, [ebp - 0x964]
push edx
mov eax, 0x400
push eax
mov dword [ebp - 0x964], eax
lea eax, [ebp - 0x938]
push eax
mov eax, dword [ecx + 4]
push 1
push dword [eax + 0x4008]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1009a4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x100a0c9
push edi
xor edi, edi
mov dword [ebp - 0x950], edi
mov dword [ebp - 0x948], 0x36
call dword [sym.imp.KERNEL32.dll_GetACP]
mov dword [ebp - 0x960], eax
sub eax, 0x3a4
mov word [ebp - 0x2c], 0xff2d
mov word [ebp - 0x2a], 0xff33
mov word [ebp - 0x28], 0x20
mov word [ebp - 0x26], 0x30b4
mov word [ebp - 0x24], 0x30b7
mov word [ebp - 0x22], 0x30c3
mov word [ebp - 0x20], 0x30af
mov word [ebp - 0x1e], di
mov word [ebp - 0x1c], 0x7d30
mov word [ebp - 0x1a], 0x660e
mov word [ebp - 0x18], 0x9ad4
mov word [ebp - 0x16], di
mov word [ebp - 0xc], 0xad74
mov word [ebp - 0xa], 0xb9bc
mov word [ebp - 8], 0xccb4
mov word [ebp - 6], di
mov word [ebp - 0x14], 0x65b0
mov word [ebp - 0x12], 0x5b8b
mov word [ebp - 0x10], 0x4f53
mov word [ebp - 0xe], di
je 0x1009b2d
sub eax, 4
je 0x1009b10
sub eax, 0xd
je 0x1009b0b
dec eax
je 0x1009b06
lea eax, [ebp - 0x330]
push 0x10020f4
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
jmp 0x1009b48
lea eax, [ebp - 0x1c]
jmp 0x1009b13
lea eax, [ebp - 0xc]
jmp 0x1009b13
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x330]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
mov dword [ebp - 0x950], 0xe0000
jmp 0x1009b48
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x330]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
mov dword [ebp - 0x950], 0xc0000
pop ecx
pop ecx
lea eax, [ebp - 0x330]
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
push dword [ebp - 0x938]
lea eax, [eax + eax + 2]
mov dword [ebp - 0x958], eax
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x100a0c8
push esi
push dword [ebp - 0x938]
call dword [sym.imp.ADVAPI32.dll_GetSidIdentifierAuthority]
push dword [ebp - 0x938]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
movzx eax, byte [eax]
mov dword [ebp - 0x93c], eax
lea eax, [eax + eax*2]
lea eax, [eax*4 + 0x21]
push eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, edi
pop ecx
mov dword [ebp - 0x940], eax
je 0x100a0c7
mov edi, dword [sym.imp.msvcrt.dll_sprintf]
push ebx
push 1
push 0x10020ec
push eax
call edi
mov ebx, eax
mov al, byte [esi]
add esp, 0xc
test al, al
jne 0x1009c0f
cmp byte [esi + 1], al
jne 0x1009c0f
movzx eax, byte [esi + 2]
movzx ecx, byte [esi + 3]
shl eax, 8
add eax, ecx
movzx ecx, byte [esi + 4]
shl eax, 8
add eax, ecx
movzx ecx, byte [esi + 5]
shl eax, 8
add eax, ecx
push eax
mov eax, dword [ebp - 0x940]
add eax, ebx
push 0x10020e8
push eax
call edi
add esp, 0xc
jmp 0x1009c3f
movzx ecx, byte [esi + 5]
push ecx
movzx ecx, byte [esi + 4]
push ecx
movzx ecx, byte [esi + 3]
push ecx
movzx ecx, byte [esi + 2]
push ecx
movzx ecx, byte [esi + 1]
movzx eax, al
push ecx
push eax
mov eax, dword [ebp - 0x940]
add eax, ebx
push 0x10020c4
push eax
call edi
add esp, 0x20
xor esi, esi
add ebx, eax
cmp dword [ebp - 0x93c], esi
jbe 0x1009c78
push esi
push dword [ebp - 0x938]
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
push dword [eax]
mov eax, dword [ebp - 0x940]
add eax, ebx
push 0x10020bc
push eax
call edi
add esp, 0xc
add ebx, eax
inc esi
cmp esi, dword [ebp - 0x93c]
jb 0x1009c4b
and dword [ebp - 0x94c], 0
lea eax, [ebp - 0x94c]
push eax
push 1
push 0
push dword [ebp - 0x940]
push reloc.WS2_32.dll_closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ecx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
cmp eax, esi
je 0x1009e1c
cmp eax, 5
je 0x1009e1c
cmp dword [ebp - 0x94c], esi
je 0x1009cc4
push dword [ebp - 0x94c]
call ecx
mov dword [ebp - 0x93c], esi
mov esi, 0x1002080
mov eax, esi
mov dword [ebp - 0x95c], 0x104
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1009cde
sub eax, ecx
mov ecx, eax
mov eax, dword [ebp - 0x940]
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1009cf2
sub eax, edi
lea eax, [eax + ecx + 1]
push eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
test ebx, ebx
pop ecx
je 0x1009e59
mov ecx, ebx
sub ecx, esi
mov al, byte [esi]
mov byte [ecx + esi], al
inc esi
test al, al
jne 0x1009d14
mov eax, dword [ebp - 0x940]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1009d26
mov edi, ebx
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1009d32
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x93c]
push eax
and ecx, 3
push 1
rep movsb byte es:[edi], byte [esi]
xor esi, esi
push esi
push ebx
push getpeername
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1009d8b
lea eax, [ebp - 0x95c]
push eax
lea eax, [ebp - 0x434]
push eax
push esi
push esi
push 0x100206c
push dword [ebp - 0x93c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x1009da2
push dword [ebp - 0x940]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
push ebx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x100a0c5
push 0x104
lea eax, [ebp - 0x538]
push eax
lea eax, [ebp - 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
jne 0x1009de3
push dword [ebp - 0x940]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
push ebx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
pop ecx
push dword [ebp - 0x93c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x100a0c6
lea eax, [ebp - 0x538]
push eax
push dword [ebp - 0x940]
push reloc.WS2_32.dll_closesocket
call dword [sym.imp.ADVAPI32.dll_RegLoadKeyA]
test eax, eax
jne 0x1009dbf
cmp dword [ebp - 0x93c], esi
je 0x1009e13
push dword [ebp - 0x93c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x1009e2c
cmp dword [ebp - 0x94c], esi
je 0x1009e2c
push dword [ebp - 0x94c]
call ecx
push 0x104
lea eax, [ebp - 0x130]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x1009e59
lea eax, [ebp - 0x130]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_strrchr]
test eax, eax
pop ecx
pop ecx
jne 0x1009e64
push dword [ebp - 0x940]
jmp 0x100a0c0
mov esi, dword [sym.imp.msvcrt.dll_strchr]
mov byte [eax], 0
jmp 0x1009e72
mov byte [eax], 0x5f
lea eax, [ebp - 0x130]
push 0x5c
push eax
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1009e6f
lea edi, [ebp - 0x130]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1009e8a
mov esi, 0x1002068
movsw word es:[edi], word [esi]
lea edi, [ebp - 0x130]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1009ea0
mov esi, 0x1002058
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x940]
mov eax, edi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1009ebc
sub eax, ecx
mov ecx, eax
lea eax, [ebp - 0x130]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1009ed0
sub eax, esi
lea esi, [eax + ecx + 0xa]
push esi
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
test ebx, ebx
pop ecx
mov dword [ebp - 0x93c], ebx
jne 0x1009ef6
push edi
jmp 0x100a0c0
push esi
push ebx
call fcn.0100cfa7
mov edx, ebx
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x1009f03
mov edi, ebx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1009f10
mov eax, 0x1002054
mov esi, eax
movsw word es:[edi], word [esi]
mov edi, ebx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1009f24
mov esi, 0x100204c
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, ebx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1009f36
mov esi, eax
lea eax, [ebp - 0x130]
movsw word es:[edi], word [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1009f4a
mov edi, ebx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1009f56
push dword [ebp - 0x940]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
lea eax, [ebp - 0x954]
push eax
push 2
push 0
push 0x1002028
push reloc.WS2_32.dll_closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, 5
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, 0x1002014
je 0x1009fd1
push dword [ebp - 0x958]
lea eax, [ebp - 0x330]
push eax
push 1
push 0
push ebx
push dword [ebp - 0x954]
call esi
test eax, eax
push dword [ebp - 0x954]
jne 0x1009dd8
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x944]
push eax
push dword [ebp - 0x93c]
push reloc.WS2_32.dll_closesocket
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x100a0ba
push 4
pop edi
push edi
lea eax, [ebp - 0x948]
push eax
push edi
push 0
push 0x1001ffc
push dword [ebp - 0x944]
call esi
test eax, eax
jne 0x100a0ae
push edi
lea eax, [ebp - 0x960]
push eax
push edi
push 0
push 0x1001fe8
push dword [ebp - 0x944]
call esi
test eax, eax
jne 0x100a0ae
push edi
lea eax, [ebp - 0x950]
push eax
push edi
push 0
push 0x1001fd4
push dword [ebp - 0x944]
call esi
test eax, eax
jne 0x100a0ae
push edi
lea eax, [ebp - 0x948]
push eax
push edi
push 0
push 0x1001fbc
push dword [ebp - 0x944]
mov dword [ebp - 0x948], 0x190
call esi
test eax, eax
jne 0x100a0ae
and dword [ebp - 0x948], eax
push edi
lea eax, [ebp - 0x948]
push eax
push edi
push 0
push 0x1001fa0
push dword [ebp - 0x944]
call esi
test eax, eax
jne 0x100a0ae
push dword [ebp - 0x958]
lea eax, [ebp - 0x330]
push eax
push 1
push 0
push ebx
push dword [ebp - 0x944]
call esi
push dword [ebp - 0x944]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x93c]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
pop ebx
pop esi
pop edi
mov ecx, dword [ebp - 4]
call fcn.0100cc0e
leave
ret