Function at 0x460490
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53fc57
mov eax, dword fs:[0]
push eax
sub esp, 0x260
mov eax, dword [0x59e074]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov edi, ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x268], eax
call fcn.00404710
test eax, eax
jne 0x4604db
xor al, al
jmp 0x460735
lea ecx, [ebp - 0x234]
call fcn.00404660
mov dword [ebp - 4], 0
mov ecx, edi
call fcn.00404680
mov esi, eax
mov edx, dword [esi + 0x14]
cmp edx, 8
jb 0x460500
mov eax, dword [esi]
cmp word [eax], 0x40
mov ecx, edi
jne 0x460540
call fcn.00404710
dec eax
lea ecx, [ebp - 0x24c]
push eax
mov edx, edi
call fcn.0040efe0
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x234]
push eax
call fcn.004058e0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x24c]
call fcn.00404600
jmp 0x460567
call fcn.00404680
lea ecx, [ebp - 0x234]
cmp ecx, eax
je 0x460567
mov eax, esi
cmp edx, 8
jb 0x460558
mov eax, dword [esi]
push dword [esi + 0x10]
lea ecx, [ebp - 0x234]
push eax
call fcn.00404720
push 0x208
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.0050c400
add esp, 0xc
lea eax, [ebp - 0x21c]
lea ecx, [ebp - 0x234]
push 0x104
push eax
call fcn.004045c0
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
cmp edi, 0x104
jb 0x4605f5
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00509f18
add esp, 4
lea ecx, [ebp - 0x234]
mov esi, eax
push edi
push esi
call fcn.004045c0
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push esi
call fcn.00404920
add esp, 4
lea ecx, [ebp - 0x234]
push eax
push esi
call fcn.00404720
push esi
call fcn.00509f13
add esp, 4
jmp 0x460617
lea eax, [ebp - 0x21c]
push eax
call fcn.00404920
add esp, 4
lea ecx, [ebp - 0x234]
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.00404720
push 0x569ae0
lea ecx, [ebp - 0x264]
call fcn.00404610
mov byte [ebp - 4], 2
lea eax, [ebp - 0x264]
push ecx
push eax
lea ecx, [ebp - 0x234]
call fcn.00406120
mov esi, eax
cmp esi, 0xffffffff
je 0x4606df
push esi
lea edx, [ebp - 0x234]
lea ecx, [ebp - 0x24c]
call fcn.0040ef70
add esp, 4
mov byte [ebp - 4], 3
mov ecx, ebx
push eax
call fcn.004058e0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x24c]
call fcn.00404600
mov edi, dword [ebp - 0x268]
test edi, edi
je 0x4606db
lea ecx, [ebp - 0x234]
call fcn.00404710
mov edx, eax
lea ecx, [ebp - 0x264]
sub edx, esi
call fcn.00404710
sub edx, eax
lea ecx, [ebp - 0x24c]
push edx
lea edx, [ebp - 0x234]
call fcn.0040efe0
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x24c]
call fcn.004045c0
mov ecx, eax
call fcn.0040ea60
mov dword [edi], eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x24c]
call fcn.00404600
mov bl, 1
jmp 0x460712
lea ecx, [ebp - 0x234]
call fcn.00404680
cmp ebx, eax
je 0x460708
call fcn.00404680
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x4606fd
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
mov ecx, ebx
call fcn.00404720
cmp dword [ebp - 0x268], 0
sete bl
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x264]
call fcn.00404600
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
call fcn.00404600
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 - 0x14]
xor ecx, ebp
call fcn.00509af6
mov esp, ebp
pop ebp
ret