Function at 0x460470
Capabilities:
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x569fac
mov eax, dword fs:[0]
push eax
sub esp, 0x258
mov eax, dword [0x5a53f4]
xor eax, esp
mov dword [esp + 0x254], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5a53f4]
xor eax, esp
push eax
lea eax, [esp + 0x26c]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x27c]
mov eax, dword [esp + 0x280]
mov esi, edx
mov dword [esp + 0x38], ecx
mov ecx, ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x28], 1
call fcn.00404b90
mov eax, dword [esi]
mov ecx, dword [eax - 0xc]
xor edi, edi
test ecx, ecx
jg 0x460513
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x26c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x254]
xor ecx, esp
call fcn.005308cb
add esp, 0x264
ret
mov esi, edx
test edi, edi
jl 0x4608df
cmp edi, ecx
jg 0x4608df
movzx edx, word [eax + edi*2]
movzx ebp, dx
cmp bp, 0x25
jne 0x46088f
lea ebp, [edi + 1]
test ebp, ebp
jl 0x460559
cmp ebp, ecx
jge 0x460559
lea edx, [eax + ebp*2]
push 0x25
push edx
call fcn.00535fcb
add esp, 8
test eax, eax
je 0x460559
sub eax, dword [esi]
sar eax, 1
test eax, eax
jge 0x4605bd
mov eax, dword [esi]
cmp edi, dword [eax - 0xc]
jg 0x4608df
movzx eax, word [eax + edi*2]
mov dword [esp + 0x14], eax
mov eax, dword [ebx]
mov edi, dword [eax - 0xc]
mov edx, dword [eax - 8]
mov ecx, 1
sub ecx, dword [eax - 4]
lea esi, [edi + 1]
sub edx, esi
or ecx, edx
jge 0x46058d
push esi
mov ecx, ebx
call fcn.00404930
mov eax, dword [ebx]
mov cx, word [esp + 0x14]
mov word [eax + edi*2], cx
test esi, esi
jl 0x4608df
mov eax, dword [ebx]
cmp esi, dword [eax - 8]
jg 0x4608df
mov dword [eax - 0xc], esi
mov edx, dword [ebx]
xor eax, eax
mov word [edx + esi*2], ax
mov edi, ebp
jmp 0x460879
mov ebx, eax
sub ebx, edi
lea ecx, [ebx - 1]
push ecx
push ebp
lea edx, [esp + 0x38]
push edx
mov ecx, esi
call fcn.004034a0
mov ebp, eax
mov dword [esp + 0x274], 0
mov ecx, dword [ebp]
mov esi, dword [ecx - 0xc]
mov eax, 1
sub eax, dword [ecx - 4]
mov ecx, dword [ecx - 8]
sub ecx, esi
or eax, ecx
jge 0x4605fe
push esi
mov ecx, ebp
call fcn.00404930
mov eax, dword [ebp]
lea ecx, [esi + 1]
push ecx
push eax
call fcn.00536ea2
add esp, 8
test esi, esi
jl 0x4608df
mov eax, dword [ebp]
cmp esi, dword [eax - 8]
jg 0x4608df
mov dword [eax - 0xc], esi
mov edx, dword [ebp]
xor eax, eax
mov word [edx + esi*2], ax
mov ebp, dword [ebp]
sub ebp, 0x10
push ebp
call fcn.00404cb0
add eax, 0x10
add esp, 4
mov dword [esp + 0x14], eax
mov byte [esp + 0x274], 2
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46066c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x38]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.00464ae0
mov ebp, dword [eax]
mov ecx, dword [esi + 0x18]
mov eax, dword [eax + 4]
mov esi, dword [esi]
mov dword [esp + 0x24], eax
mov dword [esp + 0x40], ecx
test ebp, ebp
je 0x460699
cmp ebp, esi
je 0x46069e
call fcn.005339ac
mov edx, dword [esp + 0x40]
cmp dword [esp + 0x24], edx
je 0x4606e9
test ebp, ebp
jne 0x4606e4
call fcn.005339ac
mov eax, dword [esp + 0x24]
cmp eax, dword [ebp + 0x18]
jne 0x4606bf
call fcn.005339ac
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx + 0x10]
mov ecx, dword [eax - 0xc]
push ecx
mov ecx, dword [esp + 0x1c]
push eax
call fcn.00406d20
mov edx, dword [esp + 0x14]
mov eax, dword [edx - 0xc]
lea edi, [edi + eax + 2]
jmp 0x46084a
mov ebp, dword [ebp]
jmp 0x4606b1
mov esi, dword [esp + 0x34]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x5c]
push ecx
call fcn.00464ae0
mov ebp, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [esi + 0x18]
mov esi, dword [esi]
mov dword [esp + 0x24], edx
mov dword [esp + 0x4c], eax
test ebp, ebp
je 0x460716
cmp ebp, esi
je 0x46071b
call fcn.005339ac
mov ecx, dword [esp + 0x4c]
cmp dword [esp + 0x24], ecx
je 0x460766
test ebp, ebp
jne 0x460761
call fcn.005339ac
mov edx, dword [esp + 0x24]
cmp edx, dword [ebp + 0x18]
jne 0x46073c
call fcn.005339ac
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x10]
mov ecx, dword [eax - 0xc]
push ecx
mov ecx, dword [esp + 0x1c]
push eax
call fcn.00406d20
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
lea edi, [edi + eax + 2]
jmp 0x46084a
mov ebp, dword [ebp]
jmp 0x46072e
mov ecx, dword [esp + 0x1c]
inc ebx
push ebx
push edi
lea edx, [esp + 0x34]
push edx
call fcn.004034a0
mov ecx, eax
mov byte [esp + 0x274], 3
call fcn.004063c0
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.00404cb0
lea esi, [eax + 0x10]
add esp, 4
mov dword [esp + 0x44], esi
mov byte [esp + 0x274], 5
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4607c3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x104
lea ecx, [esp + 0x64]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, 0x104
ja 0x46080d
lea eax, [esp + 0x60]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4607e2
mov ecx, dword [esp + 0x18]
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x64]
push edx
call fcn.00406d20
mov eax, dword [esp + 0x14]
mov eax, dword [eax - 0xc]
lea edi, [edi + eax + 2]
jmp 0x460826
mov eax, dword [esi - 0xc]
mov ecx, dword [esp + 0x18]
push eax
push esi
mov dword [esp + 0x30], 0
call fcn.00406d20
add edi, dword [esi - 0xc]
add esi, 0xfffffff0
mov byte [esp + 0x274], 2
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46084a
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov dword [esp + 0x274], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x460875
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov eax, dword [edx]
mov ecx, dword [eax - 0xc]
cmp edi, ecx
jl 0x460511
jmp 0x4604e5
cmp edi, ecx
jg 0x4608df
mov eax, dword [ebx]
mov ebp, dword [eax - 0xc]
movzx ecx, dx
mov edx, 1
sub edx, dword [eax - 4]
mov eax, dword [eax - 8]
lea esi, [ebp + 1]
sub eax, esi
or edx, eax
mov dword [esp + 0x14], ecx
jge 0x4608bb
push esi
mov ecx, ebx
call fcn.00404930
mov ecx, dword [ebx]
mov dx, word [esp + 0x14]
mov word [ecx + ebp*2], dx
test esi, esi
jl 0x4608df
mov eax, dword [ebx]
cmp esi, dword [eax - 8]
jg 0x4608df
mov dword [eax - 0xc], esi
mov eax, dword [ebx]
xor ecx, ecx
mov word [eax + esi*2], cx
inc edi
jmp 0x460879
push 0x80070057
call fcn.00404da0
int3