Function at 0x46c730
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x254]
sub esp, 0x254
push 0xffffffffffffffff
push 0x56a598
mov eax, dword fs:[0]
push eax
sub esp, 0x14
mov eax, dword [0x5a800c]
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 dword [ebp - 0x10], edx
mov edi, ecx
mov eax, dword [ebp + 0x25c]
mov dword [ebp - 0x14], eax
call fcn.00402520
mov edx, eax
cmp dword [edx + 0x10], 0
jne 0x46c78b
xor al, al
jmp 0x46c993
lea ecx, [ebp + 0x30]
call fcn.00402410
mov dword [ebp - 4], 0
mov eax, edx
mov esi, dword [edx + 0x14]
cmp esi, 8
jb 0x46c7a6
mov eax, dword [edx]
cmp word [eax], 0x40
jne 0x46c7d9
mov eax, dword [edx + 0x10]
lea ecx, [ebp + 0x18]
dec eax
mov edx, edi
push eax
call fcn.004191c0
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp + 0x30]
push eax
call fcn.00404b60
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x18]
call fcn.00402400
jmp 0x46c7fc
mov ecx, edi
call fcn.00402520
lea ecx, [ebp + 0x30]
cmp ecx, eax
je 0x46c7fc
mov eax, edx
cmp esi, 8
jb 0x46c7f0
mov eax, dword [edx]
push dword [edx + 0x10]
lea ecx, [ebp + 0x30]
push eax
call fcn.00402610
push 0x208
lea eax, [ebp + 0x48]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp + 0x48]
lea ecx, [ebp + 0x30]
push 0x104
push eax
call fcn.004023c0
mov ebx, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push eax
call ebx
mov edi, eax
cmp edi, 0x104
jb 0x46c877
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00559a74
add esp, 4
lea ecx, [ebp + 0x30]
mov esi, eax
push edi
push esi
call fcn.004023c0
push eax
call ebx
mov ecx, esi
call fcn.004028c0
push eax
push esi
lea ecx, [ebp + 0x30]
call fcn.00402610
push esi
call fcn.00559c78
add esp, 4
jmp 0x46c88c
lea ecx, [ebp + 0x48]
call fcn.004028c0
push eax
lea eax, [ebp + 0x48]
push eax
lea ecx, [ebp + 0x30]
call fcn.00402610
push 0x582918
lea ecx, [ebp]
call fcn.00404ba0
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x30]
call fcn.00402520
lea ecx, [ebp]
mov esi, eax
call fcn.00402520
mov edi, eax
cmp dword [edi + 0x14], 8
jb 0x46c8b9
mov eax, dword [edi]
mov ebx, dword [esi + 0x14]
mov ecx, esi
cmp ebx, 8
jb 0x46c8c5
mov ecx, dword [esi]
push dword [edi + 0x10]
mov edx, dword [esi + 0x10]
push eax
push 0
mov dword [ebp - 0x1c], edx
call fcn.00406cc0
add esp, 0xc
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x46c94f
push eax
lea edx, [ebp + 0x30]
lea ecx, [ebp + 0x18]
call fcn.00419150
add esp, 4
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x10]
push eax
call fcn.00404b60
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x18]
call fcn.00402400
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x46c94b
mov eax, dword [esi + 0x10]
lea edx, [ebp + 0x30]
sub eax, dword [edi + 0x10]
lea ecx, [ebp + 0x18]
sub eax, dword [ebp - 0x18]
push eax
call fcn.004191c0
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp + 0x18]
call fcn.004023c0
xor edx, edx
mov ecx, eax
call fcn.00418b80
mov dword [ebx], eax
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x18]
call fcn.00402400
mov bl, 1
jmp 0x46c976
lea ecx, [ebp + 0x30]
call fcn.00402520
mov ecx, dword [ebp - 0x10]
cmp ecx, eax
je 0x46c96e
cmp ebx, 8
jb 0x46c965
mov esi, dword [esi]
push dword [ebp - 0x1c]
push esi
call fcn.00402610
mov ebx, dword [ebp - 0x14]
test ebx, ebx
sete bl
mov byte [ebp - 4], 0
lea ecx, [ebp]
call fcn.00402400
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x30]
call fcn.00402400
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.0055929f
lea esp, [ebp + 0x254]
pop ebp
ret