Function at 0x478410
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x254]
sub esp, 0x254
push 0xffffffffffffffff
push 0x4cdaf8
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, dword [0x513008]
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.00412de0
mov eax, dword [eax + 0x10]
test eax, eax
jne 0x478469
xor al, al
jmp 0x4786a6
lea ecx, [ebp + 0x30]
call fcn.00412b80
mov dword [ebp - 4], 0
mov ecx, esi
call fcn.00412de0
mov ecx, eax
call fcn.00412da0
cmp word [eax], 0x40
jne 0x4784c0
mov ecx, esi
call fcn.00412de0
mov edx, esi
lea ecx, [ebp + 0x18]
mov eax, dword [eax + 0x10]
dec eax
push eax
call fcn.004864c0
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp + 0x30]
push eax
call fcn.00418a50
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x18]
call fcn.00412a40
jmp 0x4784f0
lea eax, [ebp + 0x30]
cmp eax, esi
je 0x4784f0
mov ecx, esi
call fcn.00412de0
lea ecx, [ebp + 0x30]
call fcn.00412de0
mov ecx, esi
call fcn.00412de0
mov ecx, eax
push dword [eax + 0x10]
call fcn.00412da0
push eax
lea ecx, [ebp + 0x30]
call fcn.00412f10
push 0x208
lea eax, [ebp + 0x48]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp + 0x30]
call fcn.00412de0
mov ecx, eax
call fcn.00412da0
push 0x104
lea ecx, [ebp + 0x48]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, eax
cmp ebx, 0x104
jb 0x478573
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004b6ab3
add esp, 4
lea ecx, [ebp + 0x30]
mov esi, eax
push ebx
push esi
call fcn.00412de0
mov ecx, eax
call fcn.00412da0
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push esi
lea ecx, [ebp + 0x30]
call fcn.004129f0
push esi
call fcn.004b689e
add esp, 4
jmp 0x47857f
lea eax, [ebp + 0x48]
push eax
lea ecx, [ebp + 0x30]
call fcn.004129f0
push 0x4eca7c
lea ecx, [ebp]
call fcn.00412ab0
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x30]
call fcn.00412de0
lea ecx, [ebp]
mov esi, eax
call fcn.00412de0
mov ecx, eax
push dword [eax + 0x10]
call fcn.00412da0
push eax
push 0
mov ecx, esi
call fcn.00412da0
mov edx, dword [esi + 0x10]
mov ecx, eax
call fcn.004470f0
mov ebx, eax
add esp, 0xc
cmp ebx, 0xffffffff
je 0x478653
push ebx
lea edx, [ebp + 0x30]
lea ecx, [ebp + 0x18]
call fcn.00486450
add esp, 4
mov byte [ebp - 4], 3
mov ecx, edi
push eax
call fcn.00418a50
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x18]
call fcn.00412a40
mov edi, dword [ebp - 0x10]
test edi, edi
je 0x47864f
lea ecx, [ebp + 0x30]
call fcn.00412de0
lea ecx, [ebp]
mov esi, dword [eax + 0x10]
call fcn.00412de0
lea edx, [ebp + 0x30]
lea ecx, [ebp + 0x18]
mov eax, dword [eax + 0x10]
sub esi, eax
sub esi, ebx
push esi
call fcn.004864c0
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp + 0x18]
call fcn.00412de0
mov ecx, eax
call fcn.00412da0
xor edx, edx
mov ecx, eax
call fcn.00485e80
mov dword [edi], eax
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x18]
call fcn.00412a40
mov bl, 1
jmp 0x478689
lea eax, [ebp + 0x30]
cmp edi, eax
je 0x478682
mov ecx, eax
call fcn.00412de0
mov ecx, edi
call fcn.00412de0
lea ecx, [ebp + 0x30]
call fcn.00412de0
mov ecx, eax
push dword [eax + 0x10]
call fcn.00412da0
push eax
mov ecx, edi
call fcn.00412f10
cmp dword [ebp - 0x10], 0
sete bl
mov byte [ebp - 4], 0
lea ecx, [ebp]
call fcn.00412a40
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x30]
call fcn.00412a40
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.004b6253
lea esp, [ebp + 0x254]
pop ebp
ret