Function at 0x4788e0
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x254]
sub esp, 0x254
push 0xffffffffffffffff
push 0x4cdcc8
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, dword [0x512008]
xor eax, ebp
mov dword [ebp + 0x250], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov esi, ecx
mov eax, dword [ebp + 0x25c]
mov dword [ebp - 0x10], eax
call fcn.004131e0
mov eax, dword [eax + 0x10]
test eax, eax
jne 0x478939
xor al, al
jmp 0x478b76
lea ecx, [ebp + 0x30]
call fcn.00412f80
mov dword [ebp - 4], 0
mov ecx, esi
call fcn.004131e0
mov ecx, eax
call fcn.004131a0
cmp word [eax], 0x40
jne 0x478990
mov ecx, esi
call fcn.004131e0
mov edx, esi
lea ecx, [ebp + 0x18]
mov eax, dword [eax + 0x10]
dec eax
push eax
call fcn.00486990
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp + 0x30]
push eax
call fcn.00418e50
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x18]
call fcn.00412e40
jmp 0x4789c0
lea eax, [ebp + 0x30]
cmp eax, esi
je 0x4789c0
mov ecx, esi
call fcn.004131e0
lea ecx, [ebp + 0x30]
call fcn.004131e0
mov ecx, esi
call fcn.004131e0
mov ecx, eax
push dword [eax + 0x10]
call fcn.004131a0
push eax
lea ecx, [ebp + 0x30]
call fcn.00413310
push 0x208
lea eax, [ebp + 0x48]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp + 0x30]
call fcn.004131e0
mov ecx, eax
call fcn.004131a0
push 0x104
lea ecx, [ebp + 0x48]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, eax
cmp ebx, 0x104
jb 0x478a43
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004b6c73
add esp, 4
lea ecx, [ebp + 0x30]
mov esi, eax
push ebx
push esi
call fcn.004131e0
mov ecx, eax
call fcn.004131a0
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push esi
lea ecx, [ebp + 0x30]
call fcn.00412df0
push esi
call fcn.004b6a5e
add esp, 4
jmp 0x478a4f
lea eax, [ebp + 0x48]
push eax
lea ecx, [ebp + 0x30]
call fcn.00412df0
push 0x4ecc08
lea ecx, [ebp]
call fcn.00412eb0
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x30]
call fcn.004131e0
lea ecx, [ebp]
mov esi, eax
call fcn.004131e0
mov ecx, eax
push dword [eax + 0x10]
call fcn.004131a0
push eax
push 0
mov ecx, esi
call fcn.004131a0
mov edx, dword [esi + 0x10]
mov ecx, eax
call fcn.004475c0
mov ebx, eax
add esp, 0xc
cmp ebx, 0xffffffff
je 0x478b23
push ebx
lea edx, [ebp + 0x30]
lea ecx, [ebp + 0x18]
call fcn.00486920
add esp, 4
mov byte [ebp - 4], 3
mov ecx, edi
push eax
call fcn.00418e50
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x18]
call fcn.00412e40
mov edi, dword [ebp - 0x10]
test edi, edi
je 0x478b1f
lea ecx, [ebp + 0x30]
call fcn.004131e0
lea ecx, [ebp]
mov esi, dword [eax + 0x10]
call fcn.004131e0
lea edx, [ebp + 0x30]
lea ecx, [ebp + 0x18]
mov eax, dword [eax + 0x10]
sub esi, eax
sub esi, ebx
push esi
call fcn.00486990
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp + 0x18]
call fcn.004131e0
mov ecx, eax
call fcn.004131a0
xor edx, edx
mov ecx, eax
call fcn.00486350
mov dword [edi], eax
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x18]
call fcn.00412e40
mov bl, 1
jmp 0x478b59
lea eax, [ebp + 0x30]
cmp edi, eax
je 0x478b52
mov ecx, eax
call fcn.004131e0
mov ecx, edi
call fcn.004131e0
lea ecx, [ebp + 0x30]
call fcn.004131e0
mov ecx, eax
push dword [eax + 0x10]
call fcn.004131a0
push eax
mov ecx, edi
call fcn.00413310
cmp dword [ebp - 0x10], 0
sete bl
mov byte [ebp - 4], 0
lea ecx, [ebp]
call fcn.00412e40
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x30]
call fcn.00412e40
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x250]
xor ecx, ebp
call fcn.004b6413
lea esp, [ebp + 0x254]
pop ebp
ret