Function at 0x40f8b0
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x840
mov eax, dword [0x4417c0]
xor eax, esp
mov dword [esp + 0x83c], eax
mov eax, dword [esp + 0x860]
push ebx
mov ebx, dword [esp + 0x85c]
push ebp
mov ebp, dword [esp + 0x84c]
push esi
mov esi, dword [esp + 0x854]
push edi
mov edi, dword [esp + 0x860]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
cmp ebp, 0xc
ja case.0x40f8ff.1
movzx ecx, byte [ebp + 0x40fb64]
jmp dword [ecx*4 + 0x40fb5c]
call fcn.00408db0
push ebp
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [esp + 0x28], eax
test eax, eax
je 0x40faf6
mov ebx, dword [esp + 0x864]
mov edx, dword [esp + 0x85c]
push ebx
push edi
push edx
push esi
mov byte [esi], 0
push ebp
mov byte [edi], 0
call fcn.0040f5d0
push 0x4349a4
push esi
call fcn.0041cb4f
add esp, 0x1c
test eax, eax
jne 0x40f964
push ebx
push edi
push 0x434494
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
jmp 0x40f9a1
push 4
push 0x43448c
push edi
call fcn.004252cd
add esp, 0xc
test eax, eax
jne 0x40f9a1
mov eax, edi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f980
sub eax, edx
mov esi, eax
lea eax, [esi - 4]
push eax
lea ecx, [edi + 4]
push ecx
push edi
call fcn.0041da00
add esp, 0xc
mov byte [edi + esi - 4], 0
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
cmp esi, 0xffffffff
je 0x40fa22
lea edx, [esp + 0x44]
push edx
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
movzx edx, word [esp + 0x38]
movzx eax, word [esp + 0x36]
movzx ecx, word [esp + 0x34]
push edx
movzx edx, word [esp + 0x36]
push eax
movzx eax, word [esp + 0x36]
push ecx
movzx ecx, word [esp + 0x38]
push edx
mov edx, dword [esp + 0x24]
push eax
push ecx
push 0x434984
push edx
call fcn.0041b156
add esp, 0x20
push esi
call ebp
jmp 0x40fa29
mov eax, dword [esp + 0x14]
mov byte [eax], 0
mov ecx, dword [esp + 0x86c]
mov ebx, dword [esp + 0x28]
lea edx, [esp + 0x10]
push edx
push 8
push ebx
mov dword [esp + 0x24], 0
mov dword [esp + 0x2c], 0x800
mov dword [esp + 0x30], ecx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40fa82
mov ecx, dword [0x4342dc]
mov eax, dword [esp + 0x1c]
mov dword [eax], ecx
mov dx, word [0x4342e0]
mov word [eax + 4], dx
mov cl, byte [0x4342e2]
push ebx
mov byte [eax + 6], cl
call ebp
jmp case.0x40f8ff.0
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea edx, [esp + 0x18]
push edx
push 0
push 0
push 1
push eax
call edi
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0041a6f2
mov ecx, dword [esp + 0x14]
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x40]
push edx
push eax
push esi
push 1
push ecx
call edi
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x54]
push ecx
mov ecx, dword [esi]
lea edx, [esp + 0x30]
push edx
push eax
push ecx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidA]
mov edx, dword [esp + 0x10]
push edx
call ebp
push esi
call fcn.0041a615
add esp, 4
push ebx
call ebp
jmp case.0x40f8ff.0
mov eax, dword [0x434970]
mov dword [esi], eax
mov ecx, dword [0x434974]
mov dword [esi + 4], ecx
mov edx, dword [0x434978]
mov dword [esi + 8], edx
mov eax, dword [0x43497c]
mov dword [esi + 0xc], eax
mov cx, word [0x434980]
mov eax, dword [esp + 0x14]
mov word [esi + 0x10], cx
mov dl, byte [0x434982]
mov byte [esi + 0x12], dl
mov dword [edi], 0x412f4e
mov dword [eax], 0x412f4e
mov dword [ebx], 0x412f4e
mov ecx, dword [esp + 0x84c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041a7bc
add esp, 0x840
ret