Function at 0x461670
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x244
mov eax, dword [0x594ccc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov ecx, esi
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 0x214], esi
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x220], 1
call fcn.004392b0
mov eax, dword [ebx]
mov ecx, dword [eax - 0xc]
xor edi, edi
test ecx, ecx
jg 0x4616e6
mov eax, dword [ebp - 0x220]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051d23b
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x21c]
test edi, edi
jl 0x461a71
cmp edi, ecx
jg 0x461a71
movzx edx, word [eax + edi*2]
cmp dx, 0x25
jne 0x461a12
lea edx, [edi + 1]
mov dword [ebp - 0x210], edx
test edx, edx
jl 0x461735
cmp edx, ecx
jge 0x461735
lea ecx, [eax + edx*2]
push 0x25
push ecx
call fcn.0051dd42
add esp, 8
test eax, eax
je 0x46172f
sub eax, dword [ebx]
sar eax, 1
test eax, eax
jge 0x4617a3
mov edx, dword [ebp - 0x210]
mov eax, dword [ebx]
cmp edi, dword [eax - 0xc]
jg 0x461a71
movzx eax, word [eax + edi*2]
mov dword [ebp - 0x218], eax
mov eax, dword [esi]
mov ebx, dword [eax - 0xc]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
lea edi, [ebx + 1]
sub eax, edi
or ecx, eax
jge 0x461771
push edi
mov ecx, esi
call fcn.0043a120
mov edx, dword [ebp - 0x210]
mov ecx, dword [esi]
mov ax, word [ebp - 0x218]
mov word [ecx + ebx*2], ax
test edi, edi
jl 0x461a71
mov eax, dword [esi]
cmp edi, dword [eax - 8]
jg 0x461a71
mov dword [eax - 0xc], edi
mov ecx, dword [esi]
xor eax, eax
mov word [ecx + edi*2], ax
mov edi, edx
jmp 0x4619e8
mov ecx, dword [ebp - 0x210]
sub eax, edi
mov dword [ebp - 0x218], eax
dec eax
push eax
push ecx
lea edx, [ebp - 0x224]
push edx
mov ecx, ebx
call fcn.00449720
mov ebx, eax
mov eax, dword [ebx]
mov esi, dword [eax - 0xc]
mov edx, dword [eax - 8]
mov ecx, 1
sub ecx, dword [eax - 4]
sub edx, esi
or ecx, edx
jge 0x4617e2
push esi
mov ecx, ebx
call fcn.0043a120
mov ecx, dword [ebx]
lea eax, [esi + 1]
push eax
push ecx
call fcn.0051e26d
add esp, 8
test esi, esi
jl 0x461a71
mov eax, dword [ebx]
cmp esi, dword [eax - 8]
jg 0x461a71
mov dword [eax - 0xc], esi
mov edx, dword [ebx]
xor eax, eax
mov word [edx + esi*2], ax
mov ebx, dword [ebx]
sub ebx, 0x10
push ebx
call fcn.0041eae0
add eax, 0x10
mov dword [ebp - 0x210], eax
mov eax, dword [ebp - 0x224]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x461848
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x230]
lea ecx, [ebp - 0x210]
push ecx
lea edx, [ebp - 0x244]
push edx
mov ecx, esi
call fcn.0044b3c0
mov ebx, dword [eax]
mov ecx, dword [esi + 0x18]
mov eax, dword [eax + 4]
mov esi, dword [esi]
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x238], ecx
test ebx, ebx
je 0x461881
cmp ebx, esi
je 0x461886
call fcn.0051f89a
mov edx, dword [ebp - 0x238]
cmp dword [ebp - 0x228], edx
je 0x4618dc
test ebx, ebx
jne 0x4618d8
call fcn.0051f89a
mov eax, dword [ebp - 0x228]
cmp eax, dword [ebx + 0x18]
jne 0x4618ad
call fcn.0051f89a
mov ecx, dword [ebp - 0x228]
mov eax, dword [ecx + 0x10]
mov edx, dword [eax - 0xc]
mov ecx, dword [ebp - 0x214]
push edx
push eax
call fcn.0044a1a0
mov eax, dword [ebp - 0x210]
mov ecx, dword [eax - 0xc]
lea edi, [edi + ecx + 2]
jmp 0x4619c0
mov ebx, dword [ebx]
jmp 0x46189d
mov edx, dword [ebp - 0x218]
mov ecx, dword [ebp - 0x21c]
inc edx
push edx
push edi
lea eax, [ebp - 0x234]
push eax
call fcn.00449720
mov ecx, eax
call fcn.0044f1c0
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.0041eae0
mov esi, eax
mov eax, dword [ebp - 0x234]
add eax, 0xfffffff0
add esp, 4
add esi, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x461933
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x104
lea ecx, [ebp - 0x20c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, 0x104
ja 0x461987
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x461956
mov ecx, dword [ebp - 0x214]
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp - 0x20c]
push edx
call fcn.0044a1a0
mov eax, dword [ebp - 0x210]
mov ecx, dword [eax - 0xc]
lea edi, [edi + ecx + 2]
jmp 0x4619a4
mov edx, dword [esi - 0xc]
mov ecx, dword [ebp - 0x214]
push edx
push esi
mov dword [ebp - 0x220], 0
call fcn.0044a1a0
add edi, dword [esi - 0xc]
add esi, 0xfffffff0
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4619c0
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov eax, dword [ebp - 0x210]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4619e2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x214]
mov eax, dword [ebp - 0x21c]
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
cmp edi, ecx
jl 0x4616e0
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x220]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051d23b
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
movzx ecx, dx
mov dword [ebp - 0x210], ecx
mov ecx, dword [eax - 0xc]
mov edx, 1
sub edx, dword [eax - 4]
mov eax, dword [eax - 8]
lea ebx, [ecx + 1]
sub eax, ebx
or edx, eax
mov dword [ebp - 0x218], ecx
jge 0x461a48
push ebx
mov ecx, esi
call fcn.0043a120
mov ecx, dword [ebp - 0x218]
mov edx, dword [esi]
mov ax, word [ebp - 0x210]
mov word [edx + ecx*2], ax
test ebx, ebx
jl 0x461a71
mov eax, dword [esi]
cmp ebx, dword [eax - 8]
jg 0x461a71
mov dword [eax - 0xc], ebx
mov ecx, dword [esi]
xor edx, edx
mov word [ecx + ebx*2], dx
inc edi
jmp 0x4619e8
push 0x80070057
call fcn.00414840
int3