Function at 0x490e60
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59e52c
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x5e6468]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, edx
mov edi, ecx
mov ecx, esi
mov dword [ebp - 0x228], edi
mov dword [ebp - 0x224], esi
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x22c], 1
call fcn.00427dc0
mov eax, dword [edi]
mov ecx, dword [eax - 0xc]
xor ebx, ebx
test ecx, ecx
jle 0x491210
test ebx, ebx
jl 0x491295
cmp ebx, ecx
jg 0x491295
movzx edx, word [eax + ebx*2]
movzx edi, dx
cmp di, 0x25
jne 0x491232
lea edx, [ebx + 1]
mov dword [ebp - 0x21c], edx
test edx, edx
jl 0x490f1f
cmp edx, ecx
jge 0x490f1f
lea ecx, [eax + edx*2]
push 0x25
push ecx
call fcn.00563d0d
add esp, 8
test eax, eax
je 0x490f19
mov ecx, dword [ebp - 0x228]
sub eax, dword [ecx]
sar eax, 1
test eax, eax
jge 0x490f93
mov edx, dword [ebp - 0x21c]
mov eax, dword [ebp - 0x228]
mov eax, dword [eax]
cmp ebx, dword [eax - 0xc]
jg 0x491295
movzx ecx, word [eax + ebx*2]
mov eax, dword [esi]
mov edi, dword [eax - 0xc]
mov dword [ebp - 0x220], ecx
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
lea ebx, [edi + 1]
sub eax, ebx
or ecx, eax
jge 0x490f61
push ebx
mov ecx, esi
call fcn.00427e70
mov edx, dword [ebp - 0x21c]
mov ecx, dword [esi]
mov ax, word [ebp - 0x220]
mov word [ecx + edi*2], ax
test ebx, ebx
jl 0x491295
mov eax, dword [esi]
cmp ebx, dword [eax - 8]
jg 0x491295
mov dword [eax - 0xc], ebx
mov ecx, dword [esi]
xor eax, eax
mov word [ecx + ebx*2], ax
mov ebx, edx
jmp 0x4911fd
mov edx, dword [ebp - 0x21c]
sub eax, ebx
mov dword [ebp - 0x220], eax
dec eax
push eax
push edx
lea eax, [ebp - 0x230]
push eax
call fcn.004468e0
mov esi, eax
mov dword [ebp - 4], 0
mov ecx, dword [esi]
mov edi, dword [ecx - 0xc]
mov eax, 1
sub eax, dword [ecx - 4]
mov ecx, dword [ecx - 8]
sub ecx, edi
or eax, ecx
jge 0x490fd7
push edi
mov ecx, esi
call fcn.00427e70
mov eax, dword [esi]
lea ecx, [edi + 1]
push ecx
push eax
call fcn.00564615
add esp, 8
test edi, edi
jl 0x491295
mov eax, dword [esi]
cmp edi, dword [eax - 8]
jg 0x491295
mov dword [eax - 0xc], edi
mov edx, dword [esi]
xor eax, eax
mov word [edx + edi*2], ax
mov esi, dword [esi]
sub esi, 0x10
push esi
call fcn.00427bb0
add eax, 0x10
add esp, 4
mov dword [ebp - 0x21c], eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x230]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x491041
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x23c]
lea ecx, [ebp - 0x21c]
push ecx
lea edx, [ebp - 0x250]
push edx
call fcn.004959c0
mov edi, dword [eax]
mov ecx, dword [esi + 0x18]
mov eax, dword [eax + 4]
mov esi, dword [esi]
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x244], ecx
test edi, edi
je 0x491078
cmp edi, esi
je 0x49107d
call fcn.0055e4b6
mov edx, dword [ebp - 0x244]
cmp dword [ebp - 0x234], edx
je 0x4910d3
test edi, edi
jne 0x4910cf
call fcn.0055e4b6
mov eax, dword [ebp - 0x234]
cmp eax, dword [edi + 0x18]
jne 0x4910a4
call fcn.0055e4b6
mov ecx, dword [ebp - 0x234]
mov eax, dword [ecx + 0x10]
mov ecx, dword [eax - 0xc]
push ecx
mov ecx, dword [ebp - 0x224]
push eax
call fcn.00427cf0
mov edx, dword [ebp - 0x21c]
mov eax, dword [edx - 0xc]
lea ebx, [ebx + eax + 2]
jmp 0x4911ce
mov edi, dword [edi]
jmp 0x491094
mov eax, dword [ebp - 0x220]
inc eax
push eax
push ebx
lea ecx, [ebp - 0x240]
push ecx
mov ecx, dword [ebp - 0x228]
call fcn.004468e0
mov ecx, eax
mov byte [ebp - 4], 3
call fcn.00446840
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.00427bb0
lea esi, [eax + 0x10]
add esp, 4
mov dword [ebp - 0x220], esi
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x240]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x491136
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x104
lea ecx, [ebp - 0x218]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, 0x104
ja 0x491191
lea eax, [ebp - 0x218]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x491160
mov ecx, dword [ebp - 0x224]
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp - 0x218]
push edx
call fcn.00427cf0
mov eax, dword [ebp - 0x21c]
mov eax, dword [eax - 0xc]
lea ebx, [ebx + eax + 2]
jmp 0x4911ae
mov eax, dword [esi - 0xc]
mov ecx, dword [ebp - 0x224]
push eax
push esi
mov dword [ebp - 0x22c], 0
call fcn.00427cf0
add ebx, dword [esi - 0xc]
add esi, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4911ce
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4911f7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x224]
mov eax, dword [ebp - 0x228]
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
cmp ebx, ecx
jl 0x490ec7
mov eax, dword [ebp - 0x22c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0055e289
mov esp, ebp
pop ebp
ret
cmp ebx, ecx
jg 0x491295
mov eax, dword [esi]
movzx ecx, dx
mov dword [ebp - 0x21c], ecx
mov ecx, dword [eax - 0xc]
mov edx, 1
sub edx, dword [eax - 4]
mov eax, dword [eax - 8]
lea edi, [ecx + 1]
sub eax, edi
or edx, eax
mov dword [ebp - 0x220], ecx
jge 0x49126c
push edi
mov ecx, esi
call fcn.00427e70
mov ecx, dword [ebp - 0x220]
mov edx, dword [esi]
mov ax, word [ebp - 0x21c]
mov word [edx + ecx*2], ax
test edi, edi
jl 0x491295
mov eax, dword [esi]
cmp edi, dword [eax - 8]
jg 0x491295
mov dword [eax - 0xc], edi
mov ecx, dword [esi]
xor edx, edx
mov word [ecx + edi*2], dx
inc ebx
jmp 0x4911fd
push 0x80070057
call fcn.00425c60
int3